Ejemplo n.º 1
0
 public override void LearnedInstanceId(long instanceId)
 {
     this._lastLearnedInstanceId = Math.Max(_lastLearnedInstanceId, instanceId);
     if (_lastLearnedInstanceId > CommonState.lastKnownLearnedInstanceInCluster())
     {
         CommonState.setLastKnownLearnedInstanceInCluster(_lastLearnedInstanceId, null);
     }
 }
Ejemplo n.º 2
0
        public override InstanceId NewInstanceId()
        {
            // Never propose something lower than last received instance id
            if (CommonState.lastKnownLearnedInstanceInCluster() >= CommonState.nextInstanceId())
            {
                CommonState.NextInstanceId = CommonState.lastKnownLearnedInstanceInCluster() + 1;
            }

            return(new InstanceId(CommonState.AndIncrementInstanceId));
        }
Ejemplo n.º 3
0
 public override bool HasDeliveredAllKnownInstances()
 {
     return(_lastDeliveredInstanceId == CommonState.lastKnownLearnedInstanceInCluster());
 }