private Task FilterPrimaryNodesStatusAsync(CancellationToken token) { var primaryNodeTypes = PaasCoordinator.GetPrimaryNodeTypes(this.configStore, this.configSectionName); if (primaryNodeTypes == null || !primaryNodeTypes.Any()) { return(Task.FromResult(true)); } var manager = new NodeStatusManager(this.kvsStore, this.configStore, this.configSectionName); return(manager.FilterNodeTypesAsync(primaryNodeTypes, Constants.KvsCommitTimeout, token)); }
public ClusterCommandProcessor( IConfigStore configStore, string configSectionName, IFabricClientWrapper fabricClientWrapper, CommandParameterGenerator commandParameterGenerator, NodeStatusManager nodeStatusManager, JsonSerializer jsonSerializer) { configStore.ThrowIfNull(nameof(configStore)); configSectionName.ThrowIfNullOrWhiteSpace(nameof(configSectionName)); fabricClientWrapper.ThrowIfNull(nameof(fabricClientWrapper)); commandParameterGenerator.ThrowIfNull(nameof(commandParameterGenerator)); nodeStatusManager.ThrowIfNull(nameof(nodeStatusManager)); jsonSerializer.ThrowIfNull(nameof(jsonSerializer)); this.configStore = configStore; this.configSectionName = configSectionName; this.fabricClientWrapper = fabricClientWrapper; this.commandParameterGenerator = commandParameterGenerator; this.nodeStatusManager = nodeStatusManager; this.serializer = jsonSerializer; }