internal ClusterSnapshotInitializer(string nodeNameText, Properties properties, ILogger logger) { _localNodeId = Id.Of(properties.NodeId(nodeNameText)); _configuration = new ClusterConfiguration(logger); _localNode = _configuration.NodeMatching(_localNodeId); _communicationsHub = new NetworkCommunicationsHub(); _registry = new LocalRegistry(_localNode, _configuration, logger); }
public void Open(Stage stage, Wire.Node.Node node, IInboundStreamInterest interest, IConfiguration configuration) { _operationalInboundStream = InboundStreamFactory.Instance( stage, interest, node.OperationalAddress.Port, AddressType.Op, OpName, Properties.Instance.OperationalBufferSize(), Properties.Instance.OperationalInboundProbeInterval()); _operationalOutboundStream = OperationalOutboundStreamFactory.Instance( stage, node, new ManagedOutboundSocketChannelProvider(node, AddressType.Op, configuration), new ByteBufferPool( Properties.Instance.OperationalOutgoingPooledBuffers(), Properties.Instance.OperationalBufferSize())); _applicationInboundStream = InboundStreamFactory.Instance( stage, interest, node.ApplicationAddress.Port, AddressType.App, AppName, Properties.Instance.ApplicationBufferSize(), Properties.Instance.ApplicationInboundProbeInterval()); _applicationOutboundStream = ApplicationOutboundStreamFactory.Instance( stage, new ManagedOutboundSocketChannelProvider(node, AddressType.App, configuration), new ByteBufferPool( Properties.Instance.ApplicationOutgoingPooledBuffers(), Properties.Instance.ApplicationBufferSize())); }
public void InformNodeTimedOut(Wire.Node.Node node, bool isHealthyCluster) => _broadcaster.InformNodeLeftCluster(node.Id, isHealthyCluster);
public void InformNodeJoinedCluster(Wire.Node.Node node, bool isHealthyCluster) => _broadcaster.InformNodeJoinedCluster(node.Id, isHealthyCluster);
public void InformLeaderDemoted(Wire.Node.Node node, bool isHealthyCluster) => _broadcaster.InformLeaderLost(node.Id, isHealthyCluster);
public void InformCurrentLeader(Wire.Node.Node node, bool isHealthyCluster) => _broadcaster.InformLeaderElected(node.Id, isHealthyCluster, node.Id.Equals(_localNode.Id));
public void InformConfirmedByLeader(Wire.Node.Node node, bool isHealthyCluster) => _broadcaster.InformNodeIsHealthy(node.Id, isHealthyCluster);
public void JoinLocalWith(Wire.Node.Node remoteNode) { Join(_node); Join(remoteNode); }