/// <summary> /// Add a Consumer /// </summary> /// <param name="analysisConsumer">Consumer</param> /// <param name="option">Consuming options.</param> public void AddConsumer(IAnalysisConsumer analysisConsumer, ConsumeOptions option) { Assert.IsNotNull(analysisConsumer, "analysisConsumer"); var signalTriggeredAgents = this.GetSignalTriggeredAgents(); if (signalTriggeredAgents == null) { return; } foreach (var oneAgent in signalTriggeredAgents) { this.Logger.LogMessage("AddConsumer:: Agent: {0}, Adding Consumer: {1} with Option: {2}", oneAgent, analysisConsumer.GetType(), option); this.analysisScheduler.AddConsumer(oneAgent, analysisConsumer, option); } }
internal void AddConsumer(AgentIdentifier agentIdentifier, IAnalysisConsumer analysisConsumer, ConsumeOptions option) { Assert.IsNotNull(analysisConsumer, "analysisConsumer"); if (this.consumerMap.ContainsKey(agentIdentifier)) { var consumersForThisAgent = this.consumerMap[agentIdentifier]; if (consumersForThisAgent.Contains(new KeyValuePair <IAnalysisConsumer, ConsumeOptions>(analysisConsumer, option))) { throw new Exception(string.Format(CultureInfo.InvariantCulture, "Consumer: {0} with Option: {1} Already Present", analysisConsumer, option)); } consumersForThisAgent[analysisConsumer] = option; } else { this.consumerMap[agentIdentifier] = new Dictionary <IAnalysisConsumer, ConsumeOptions> { { analysisConsumer, option } }; } }
public ConsumeBuilder UseConsumeOptions(ConsumeOptions consumeOptions) { ConsumeOptions = consumeOptions; return(this); }
public static void Execute(ConsumeOptions options) { }
public void AddConsumer(InsightType insightType, IAnalysisConsumer analysisConsumer, ConsumeOptions options) { switch (insightType) { case InsightType.PartitionInsight: if (this.partitionInsightGenerator != null) { this.partitionInsightGenerator.AddConsumer(analysisConsumer, options); } break; case InsightType.ReplicaInsight: break; case InsightType.CodePackageInsight: break; case InsightType.NodeInsight: break; case InsightType.ClusterInsight: break; default: throw new NotSupportedException(string.Format(CultureInfo.InvariantCulture, "Insight Type '{0}' is currently not supported", insightType)); } }