public DefaultBoltConnection(BoltChannel channel, PackOutput output, BoltStateMachine machine, LogService logService, BoltConnectionLifetimeListener listener, BoltConnectionQueueMonitor queueMonitor, int maxBatchSize) { this._id = channel.Id(); this._channel = channel; this._output = output; this._machine = machine; this._listener = listener; this._queueMonitor = queueMonitor; this._log = logService.GetInternalLog(this.GetType()); this._userLog = logService.GetUserLog(this.GetType()); this._maxBatchSize = maxBatchSize; this._batch = new List <Job>(maxBatchSize); }
public BoltStateMachineV1(BoltStateMachineSPI spi, BoltChannel boltChannel, Clock clock) { this._id = boltChannel.Id(); this._boltChannel = boltChannel; this._spi = spi; this.ConnectionStateConflict = new MutableConnectionState(); this._context = new BoltStateMachineV1Context(this, boltChannel, spi, ConnectionStateConflict, clock); States states = BuildStates(); this._state = states.Initial; this._failedState = states.Failed; }