public TransactionPropagator(Configuration config, Log log, Slaves slaves, CommitPusher pusher) { this._config = config; this._log = log; this._slaves = slaves; this._pusher = pusher; _slaveCommitFailureLogger = (new CappedLogger(log)).setTimeLimit(5, SECONDS, Clocks.systemClock()); _pushedToTooFewSlaveLogger = (new CappedLogger(log)).setTimeLimit(5, SECONDS, Clocks.systemClock()); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldCapUndesiredSlaveCountPushLogging() public virtual void ShouldCapUndesiredSlaveCountPushLogging() { // GIVEN int serverId = 1; //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.neo4j.cluster.InstanceId instanceId = new org.neo4j.cluster.InstanceId(serverId); InstanceId instanceId = new InstanceId(serverId); Configuration config = new ConfigurationAnonymousInnerClass(this, instanceId); Log logger = mock(typeof(Log)); Slaves slaves = mock(typeof(Slaves)); when(slaves.GetSlaves()).thenReturn(Collections.emptyList()); CommitPusher pusher = mock(typeof(CommitPusher)); TransactionPropagator propagator = Life.add(new TransactionPropagator(config, logger, slaves, pusher)); // WHEN for (int i = 0; i < 10; i++) { propagator.Committed(Org.Neo4j.Kernel.impl.transaction.log.TransactionIdStore_Fields.BASE_TX_ID, serverId); } // THEN verify(logger, times(1)).info(anyString()); }
public RunnableAnonymousInnerClass(CommitPusher outerInstance, BlockingQueue <PullUpdateFuture> finalQueue) { this.outerInstance = outerInstance; this._finalQueue = finalQueue; currentPulls = new List <>(); }