Exemple #1
0
 public StateConsumer(
     IConsumer <byte[], byte[]> globalConsumer,
     IGlobalStateMaintainer globalStateMaintainer,
     TimeSpan pollTime,
     TimeSpan flushInterval)
 {
     this.globalConsumer        = globalConsumer;
     this.globalStateMaintainer = globalStateMaintainer;
     this.pollTime      = pollTime;
     this.flushInterval = flushInterval;
 }
Exemple #2
0
 public StateConsumer(
     IConsumer <byte[], byte[]> globalConsumer,
     IGlobalStateMaintainer globalStateMaintainer,
     TimeSpan pollTime,
     TimeSpan flushInterval,
     long maxPollRecords)
 {
     this.globalConsumer        = globalConsumer;
     this.globalStateMaintainer = globalStateMaintainer;
     this.pollTime       = pollTime;
     this.flushInterval  = flushInterval;
     this.maxPollRecords = maxPollRecords;
 }
Exemple #3
0
        public GlobalStreamThread(string threadClientId,
                                  IConsumer <byte[], byte[]> globalConsumer,
                                  IStreamConfig configuration,
                                  IGlobalStateMaintainer globalStateMaintainer)
        {
            logPrefix = $"global-stream-thread {threadClientId} ";

            this.globalConsumer        = globalConsumer;
            this.configuration         = configuration;
            this.globalStateMaintainer = globalStateMaintainer;

            thread = new Thread(Run);
            State  = GlobalThreadState.CREATED;
        }