Ejemplo n.º 1
0
        internal ElectionContextImpl(InstanceId me, CommonContextState commonState, LogProvider logging, Timeouts timeouts, ClusterContext clusterContext, HeartbeatContext heartbeatContext, IList <ElectionRole> roles, IDictionary <string, Election> elections, ElectionCredentialsProvider electionCredentialsProvider) : base(me, commonState, logging, timeouts)
        {
            this._clusterContext              = clusterContext;
            this._heartbeatContext            = heartbeatContext;
            this._roles                       = roles;
            this._elections                   = elections;
            this._electionCredentialsProvider = electionCredentialsProvider;

            heartbeatContext.AddHeartbeatListener(this);
        }
Ejemplo n.º 2
0
 internal ClusterContextImpl(InstanceId me, CommonContextState commonState, LogProvider logging, Timeouts timeouts, Executor executor, ObjectOutputStreamFactory objectOutputStreamFactory, ObjectInputStreamFactory objectInputStreamFactory, LearnerContext learnerContext, HeartbeatContext heartbeatContext, Config config) : base(me, commonState, logging, timeouts)
 {
     this._executor = executor;
     this._objectOutputStreamFactory = objectOutputStreamFactory;
     this._objectInputStreamFactory  = objectInputStreamFactory;
     this._learnerContext            = learnerContext;
     this._heartbeatContext          = heartbeatContext;
     this._config = config;
     heartbeatContext.AddHeartbeatListener(new HeartbeatListener_AdapterAnonymousInnerClass(this));
 }