예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldCallDrainedOnSingleMonitor()
        public virtual void ShouldCallDrainedOnSingleMonitor()
        {
            ICollection <Job>                   batch            = new List <Job>();
            BoltConnectionQueueMonitor          monitor          = mock(typeof(BoltConnectionQueueMonitor));
            BoltConnectionQueueMonitorAggregate monitorAggregate = new BoltConnectionQueueMonitorAggregate(monitor);

            monitorAggregate.Drained(_connection, batch);

            verify(monitor).drained(_connection, batch);
        }
예제 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldCallEnqueuedOnSingleMonitor()
        public virtual void ShouldCallEnqueuedOnSingleMonitor()
        {
            Job job = mock(typeof(Job));
            BoltConnectionQueueMonitor          monitor          = mock(typeof(BoltConnectionQueueMonitor));
            BoltConnectionQueueMonitorAggregate monitorAggregate = new BoltConnectionQueueMonitorAggregate(monitor);

            monitorAggregate.Enqueued(_connection, job);

            verify(monitor).enqueued(_connection, job);
        }
예제 #3
0
 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);
 }
예제 #4
0
 internal MetricsReportingBoltConnection(BoltChannel channel, PackOutput output, BoltStateMachine machine, LogService logService, BoltConnectionLifetimeListener listener, BoltConnectionQueueMonitor queueMonitor, int maxBatchSize, BoltConnectionMetricsMonitor metricsMonitor, Clock clock) : base(channel, output, machine, logService, listener, queueMonitor, maxBatchSize)
 {
     this._metricsMonitor = metricsMonitor;
     this._clock          = clock;
 }
예제 #5
0
 internal MetricsReportingBoltConnection(BoltChannel channel, PackOutput output, BoltStateMachine machine, LogService logService, BoltConnectionLifetimeListener listener, BoltConnectionQueueMonitor queueMonitor, BoltConnectionMetricsMonitor metricsMonitor, Clock clock) : this(channel, output, machine, logService, listener, queueMonitor, DefaultMaxBatchSize, metricsMonitor, clock)
 {
 }
예제 #6
0
 public DefaultBoltConnection(BoltChannel channel, PackOutput output, BoltStateMachine machine, LogService logService, BoltConnectionLifetimeListener listener, BoltConnectionQueueMonitor queueMonitor) : this(channel, output, machine, logService, listener, queueMonitor, DefaultMaxBatchSize)
 {
 }