コード例 #1
0
 protected internal static ICollection<int> AgentInstanceIds(
     FireAndForgetProcessor processor,
     ContextPartitionSelector optionalSelector,
     ContextManagementService contextManagementService)
 {
     var contextManager = contextManagementService.GetContextManager(
         processor.ContextDeploymentId,
         processor.ContextName);
     return contextManager.Realization.GetAgentInstanceIds(
         optionalSelector == null ? ContextPartitionSelectorAll.INSTANCE : optionalSelector);
 }
コード例 #2
0
        public static ICollection <int> GetAgentInstanceIds(
            FireAndForgetProcessor processor,
            ContextPartitionSelector selector,
            ContextManagementService contextManagementService,
            String contextName)
        {
            ICollection <int> agentInstanceIds;

            if (selector == null || selector is ContextPartitionSelectorAll)
            {
                agentInstanceIds = processor.GetProcessorInstancesAll();
            }
            else
            {
                ContextManager contextManager = contextManagementService.GetContextManager(contextName);
                if (contextManager == null)
                {
                    throw new EPException("Context by name '" + contextName + "' could not be found");
                }
                agentInstanceIds = contextManager.GetAgentInstanceIds(selector);
            }
            return(agentInstanceIds);
        }