Package com.espertech.esper.core.context.mgr

Examples of com.espertech.esper.core.context.mgr.ContextManager


        Collection<Integer> agentInstanceIds;
        if (selector == null || selector instanceof 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;
    }
View Full Code Here


        Collection<Integer> agentInstanceIds;
        if (contextPartitionSelectors == null || contextPartitionSelectors[0] instanceof ContextPartitionSelectorAll) {
            agentInstanceIds = processors[0].getProcessorInstancesAll();
        }
        else {
            ContextManager contextManager = services.getContextManagementService().getContextManager(statementSpec.getOptionalContextName());
            agentInstanceIds = contextManager.getAgentInstanceIds(contextPartitionSelectors[0]);
        }

        // collect events and agent instances
        for (int agentInstanceId : agentInstanceIds) {
            NamedWindowProcessorInstance processorInstance = processors[0].getProcessorInstance(agentInstanceId);
View Full Code Here

        Collection<Integer> contextPartitions;
        if (contextPartitionSelector == null || contextPartitionSelector instanceof ContextPartitionSelectorAll) {
            contextPartitions = namedWindowProcessor.getProcessorInstancesAll();
        }
        else {
            ContextManager contextManager = services.getContextManagementService().getContextManager(namedWindowProcessor.getContextName());
            contextPartitions = contextManager.getAgentInstanceIds(contextPartitionSelector);
        }

        // collect events
        ArrayDeque<EventBean> events = new ArrayDeque<EventBean>();
        for (int agentInstanceId : contextPartitions) {
View Full Code Here

        Collection<Integer> agentInstanceIds;
        if (selector == null || selector instanceof 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;
    }
View Full Code Here

        Collection<Integer> agentInstanceIds;
        if (contextPartitionSelectors == null || contextPartitionSelectors[0] instanceof ContextPartitionSelectorAll) {
            agentInstanceIds = processors[0].getProcessorInstancesAll();
        }
        else {
            ContextManager contextManager = services.getContextManagementService().getContextManager(statementSpec.getOptionalContextName());
            agentInstanceIds = contextManager.getAgentInstanceIds(contextPartitionSelectors[0]);
        }

        // collect events and agent instances
        for (int agentInstanceId : agentInstanceIds) {
            NamedWindowProcessorInstance processorInstance = processors[0].getProcessorInstance(agentInstanceId);
View Full Code Here

        Collection<Integer> contextPartitions;
        if (contextPartitionSelector == null || contextPartitionSelector instanceof ContextPartitionSelectorAll) {
            contextPartitions = namedWindowProcessor.getProcessorInstancesAll();
        }
        else {
            ContextManager contextManager = services.getContextManagementService().getContextManager(namedWindowProcessor.getContextName());
            contextPartitions = contextManager.getAgentInstanceIds(contextPartitionSelector);
        }

        // collect events
        ArrayDeque<EventBean> events = new ArrayDeque<EventBean>();
        for (int agentInstanceId : contextPartitions) {
View Full Code Here

        Collection<Integer> agentInstanceIds;
        if (contextPartitionSelectors == null || contextPartitionSelectors[0] instanceof ContextPartitionSelectorAll) {
            agentInstanceIds = processors[0].getProcessorInstancesAll();
        }
        else {
            ContextManager contextManager = services.getContextManagementService().getContextManager(statementSpec.getOptionalContextName());
            agentInstanceIds = contextManager.getAgentInstanceIds(contextPartitionSelectors[0]);
        }

        // collect events and agent instances
        for (int agentInstanceId : agentInstanceIds) {
            NamedWindowProcessorInstance processorInstance = processors[0].getProcessorInstance(agentInstanceId);
View Full Code Here

        Collection<Integer> contextPartitions;
        if (contextPartitionSelector == null || contextPartitionSelector instanceof ContextPartitionSelectorAll) {
            contextPartitions = namedWindowProcessor.getProcessorInstancesAll();
        }
        else {
            ContextManager contextManager = services.getContextManagementService().getContextManager(namedWindowProcessor.getContextName());
            contextPartitions = contextManager.getAgentInstanceIds(contextPartitionSelector);
        }

        // collect events
        ArrayDeque<EventBean> events = new ArrayDeque<EventBean>();
        for (int agentInstanceId : contextPartitions) {
View Full Code Here

                if (!contextPartitionName.equals(metaData.getContextPartitionName())) {
                    throw new VariableNotFoundException("Variable by name '" + variableName + "' is a declared for context '" + metaData.getContextPartitionName() + "' however the expected context is '" + contextPartitionName + "'");
                }
            }
        }
        ContextManager contextManager = services.getContextManagementService().getContextManager(contextPartitionName);
        if (contextManager == null) {
            throw new VariableNotFoundException("Context by name '" + contextPartitionName + "' cannot be found");
        }
        Map<Integer, ContextPartitionDescriptor> contextPartitions = contextManager.extractPaths(contextPartitionSelector).getContextPartitionInformation();
        if (contextPartitions.isEmpty()) {
            return Collections.emptyMap();
        }
        Map<String, List<ContextPartitionVariableState>> statesMap = new HashMap<String, List<ContextPartitionVariableState>>();
        for (String variableName : variableNames) {
View Full Code Here

        Collection<Integer> agentInstanceIds;
        if (selector == null || selector instanceof 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;
    }
View Full Code Here

TOP

Related Classes of com.espertech.esper.core.context.mgr.ContextManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.