Beispiel #1
0
//JAVA TO C# CONVERTER WARNING: Java wildcard generics have no direct equivalent in .NET:
//ORIGINAL LINE: private org.neo4j.causalclustering.messaging.LifecycleMessageHandler<org.neo4j.causalclustering.core.consensus.RaftMessages_ReceivedInstantClusterIdAwareMessage<?>> createMessageHandlerChain(org.neo4j.causalclustering.core.server.CoreServerModule coreServerModule)
        private LifecycleMessageHandler <RaftMessages_ReceivedInstantClusterIdAwareMessage <object> > CreateMessageHandlerChain(CoreServerModule coreServerModule)
        {
            RaftMessageApplier messageApplier = new RaftMessageApplier(_localDatabase, _logProvider, _consensusModule.raftMachine(), coreServerModule.DownloadService(), coreServerModule.CommandApplicationProcess(), _catchupAddressProvider);

            ComposableMessageHandler monitoringHandler         = RaftMessageMonitoringHandler.composable(_platformModule.clock, _platformModule.monitors);
            ComposableMessageHandler batchingMessageHandler    = CreateBatchingHandler(_platformModule.config);
            ComposableMessageHandler leaderAvailabilityHandler = LeaderAvailabilityHandler.composable(_consensusModule.LeaderAvailabilityTimers, _platformModule.monitors.newMonitor(typeof(RaftMessageTimerResetMonitor)), _consensusModule.raftMachine().term);
            ComposableMessageHandler clusterBindingHandler     = ClusterBindingHandler.Composable(_logProvider);

            return(clusterBindingHandler.compose(leaderAvailabilityHandler).compose(batchingMessageHandler).compose(monitoringHandler).apply(messageApplier));
        }
Beispiel #2
0
 private void InitializeInstanceFields()
 {
     _heartbeat = Org.Neo4j.causalclustering.core.consensus.RaftMessages_ReceivedInstantClusterIdAwareMessage.of(Instant.now(), _clusterId, new Org.Neo4j.causalclustering.core.consensus.RaftMessages_Heartbeat(new MemberId(System.Guid.randomUUID()), 0L, 0, 0));
     _handler   = new ClusterBindingHandler(@delegate, NullLogProvider.Instance);
 }