public DxStoreHealthChecker(DxStoreInstance instance) { this.instance = instance; this.StoreState = StoreState.Initializing; this.instanceClientFactory = new InstanceClientFactory(instance.GroupConfig, null); this.WhenMajority = Subject.Synchronize <GroupStatusInfo, GroupStatusInfo>(new Subject <GroupStatusInfo>(), Scheduler.TaskPool); }
public DxStoreStateMachine(Policy policy, DxStoreInstance instance, INodeEndPoints <ServiceEndpoint> nodeEndPoints, IStorage <string, DxStoreCommand> storage, GroupMembersMesh mesh, Counters perfCounter, Round <string>?roundInitial) : base(nodeEndPoints, mesh, storage, policy, null, perfCounter, roundInitial) { this.instance = instance; this.self = nodeEndPoints.Self; this.localDataStore = instance.LocalDataStore; this.Mesh = mesh; this.truncator = new PeriodicPaxosTrancator(instance); }
public DxStoreAccess(DxStoreInstance instance) { this.instance = instance; this.UpdateTimeout = instance.GroupConfig.Settings.PaxosUpdateTimeout; }
public LocalCommitAcknowledger(DxStoreInstance instance) { this.instance = instance; this.OldestItemTime = DateTimeOffset.Now; }
public SnapshotManager(DxStoreInstance instance) { this.instance = instance; this.SnapshotFileNameFullPath = this.GetSnapshotFileName(); }
public void CheckGroup(InstanceGroupConfig group) { if (!group.IsConfigurationReady) { return; } bool flag = false; bool flag2 = false; bool flag3 = false; Tuple <InstanceGroupConfig, DxStoreInstanceChecker> instanceContainer = this.GetInstanceContainer(group.Name); if (instanceContainer == null) { flag = (group.IsAutomaticActionsAllowed && group.IsMembersContainSelf); } else if (!group.IsAutomaticActionsAllowed || !group.IsMembersContainSelf) { flag2 = true; } else { InstanceGroupConfig item = instanceContainer.Item1; DxStoreInstanceChecker item2 = instanceContainer.Item2; if (item2.IsRestartRequested || group.IsRestartRequested) { flag3 = true; } } if (flag3) { this.RestartInstanceInternal(group, false); } else if (flag2) { this.StopInstanceInternal(group.Name, false); } else if (flag) { this.StartInstanceInternal(group, false); } if (!group.IsMembersContainSelf && !group.IsConfigurationManagedExternally && DxStoreInstance.RemoveGroupStorage(this.EventLogger, group)) { this.RemoveGroupConfig(group); } }
public PeriodicPaxosTrancator(DxStoreInstance instance) { this.instance = instance; }