Package com.espertech.esper.client.context

Examples of com.espertech.esper.client.context.ContextPartitionSelectorFiltered


                endpoint, this);
    }

    public Collection<Integer> getSelectedContextPartitionPathIds(ContextPartitionSelector contextPartitionSelector) {
        if (contextPartitionSelector instanceof ContextPartitionSelectorFiltered) {
            ContextPartitionSelectorFiltered filter = (ContextPartitionSelectorFiltered) contextPartitionSelector;
            ContextPartitionIdentifierInitiatedTerminated identifier = new ContextPartitionIdentifierInitiatedTerminated();
            List<Integer> accepted = new ArrayList<Integer>();
            for (Map.Entry<ContextControllerCondition, ContextControllerInitTermInstance> entry : endConditions.entrySet()) {
                identifier.setEndTime(entry.getValue().getEndTime());
                identifier.setStartTime(entry.getValue().getStartTime());
                identifier.setProperties(entry.getValue().getStartProperties());
                identifier.setContextPartitionId(entry.getValue().getInstanceHandle().getContextPartitionOrPathId());
                if (filter.filter(identifier)) {
                    accepted.add(entry.getValue().getInstanceHandle().getContextPartitionOrPathId());
                }
            }
            return accepted;
        }
View Full Code Here


                return Collections.singleton(hash.getHashes().iterator().next());
            }
            return new ArrayList<Integer>(hash.getHashes());
        }
        if (contextPartitionSelector instanceof ContextPartitionSelectorFiltered) {
            ContextPartitionSelectorFiltered filter = (ContextPartitionSelectorFiltered) contextPartitionSelector;
            ContextPartitionIdentifierHash identifierHash = new ContextPartitionIdentifierHash();
            List<Integer> accepted = new ArrayList<Integer>();
            for (Map.Entry<Integer, ContextControllerInstanceHandle> entry : partitionKeys.entrySet()) {
                identifierHash.setHash(entry.getKey());
                identifierHash.setContextPartitionId(entry.getValue().getContextPartitionOrPathId());
                if (filter.filter(identifierHash)) {
                    accepted.add(entry.getValue().getContextPartitionOrPathId());
                }
            }
            return accepted;
        }
View Full Code Here

    public Collection<Integer> getSelectedContextPartitionPathIds(ContextPartitionSelector contextPartitionSelector) {
        boolean isMultiKey = factory.getContextDetailPartitionItems().get(0).getPropertyNames().size() > 1;
        if (contextPartitionSelector instanceof ContextPartitionSelectorFiltered) {
            List<Integer> ids = new ArrayList<Integer>();
            ContextPartitionSelectorFiltered filtered = (ContextPartitionSelectorFiltered) contextPartitionSelector;

            ContextPartitionIdentifierPartitioned identifier = new ContextPartitionIdentifierPartitioned();
            for (Map.Entry<Object, ContextControllerInstanceHandle> entry : partitionKeys.entrySet()) {
                identifier.setContextPartitionId(entry.getValue().getContextPartitionOrPathId());
                if (isMultiKey) {
                    identifier.setKeys(((MultiKeyUntyped)entry.getKey()).getKeys());
                }
                else {
                    identifier.setKeys(new Object[] {entry.getKey()});
                }

                if (filtered.filter(identifier)) {
                    ids.add(entry.getValue().getContextPartitionOrPathId());
                }
            }
            return ids;
        }
View Full Code Here

    public Collection<Integer> getSelectedContextPartitionPathIds(ContextPartitionSelector contextPartitionSelector) {
        boolean isMultiKey = factory.getContextDetailPartitionItems().get(0).getPropertyNames().size() > 1;
        if (contextPartitionSelector instanceof ContextPartitionSelectorFiltered) {
            List<Integer> ids = new ArrayList<Integer>();
            ContextPartitionSelectorFiltered filtered = (ContextPartitionSelectorFiltered) contextPartitionSelector;

            ContextPartitionIdentifierPartitioned identifier = new ContextPartitionIdentifierPartitioned();
            for (Map.Entry<Object, ContextControllerInstanceHandle> entry : partitionKeys.entrySet()) {
                identifier.setContextPartitionId(entry.getValue().getContextPartitionOrPathId());
                if (isMultiKey) {
                    identifier.setKeys(((MultiKeyUntyped)entry.getKey()).getKeys());
                }
                else {
                    identifier.setKeys(new Object[] {entry.getKey()});
                }

                if (filtered.filter(identifier)) {
                    ids.add(entry.getValue().getContextPartitionOrPathId());
                }
            }
            return ids;
        }
View Full Code Here

        this.factory = factory;
    }

    public Collection<Integer> getSelectedContextPartitionPathIds(ContextPartitionSelector contextPartitionSelector) {
        if (contextPartitionSelector instanceof ContextPartitionSelectorFiltered) {
            ContextPartitionSelectorFiltered filter = (ContextPartitionSelectorFiltered) contextPartitionSelector;
            ContextPartitionIdentifierCategory identifier = new ContextPartitionIdentifierCategory();
            List<Integer> accepted = new ArrayList<Integer>();
            for (Map.Entry<Integer, ContextControllerInstanceHandle> entry : handleCategories.entrySet()) {
                identifier.setContextPartitionId(entry.getValue().getContextPartitionOrPathId());
                identifier.setLabel(factory.getCategorySpec().getItems().get(entry.getKey()).getName());
                if (filter.filter(identifier)) {
                    accepted.add(entry.getValue().getContextPartitionOrPathId());
                }
            }
            return accepted;
        }
View Full Code Here

                endpoint, this);
    }

    public Collection<Integer> getSelectedContextPartitionPathIds(ContextPartitionSelector contextPartitionSelector) {
        if (contextPartitionSelector instanceof ContextPartitionSelectorFiltered) {
            ContextPartitionSelectorFiltered filter = (ContextPartitionSelectorFiltered) contextPartitionSelector;
            ContextPartitionIdentifierInitiatedTerminated identifier = new ContextPartitionIdentifierInitiatedTerminated();
            List<Integer> accepted = new ArrayList<Integer>();
            for (Map.Entry<ContextControllerCondition, ContextControllerInitTermInstance> entry : endConditions.entrySet()) {
                identifier.setEndTime(entry.getValue().getEndTime());
                identifier.setStartTime(entry.getValue().getStartTime());
                identifier.setProperties(entry.getValue().getStartProperties());
                identifier.setContextPartitionId(entry.getValue().getInstanceHandle().getContextPartitionOrPathId());
                if (filter.filter(identifier)) {
                    accepted.add(entry.getValue().getInstanceHandle().getContextPartitionOrPathId());
                }
            }
            return accepted;
        }
View Full Code Here

                return Collections.singleton(hash.getHashes().iterator().next());
            }
            return new ArrayList<Integer>(hash.getHashes());
        }
        if (contextPartitionSelector instanceof ContextPartitionSelectorFiltered) {
            ContextPartitionSelectorFiltered filter = (ContextPartitionSelectorFiltered) contextPartitionSelector;
            ContextPartitionIdentifierHash identifierHash = new ContextPartitionIdentifierHash();
            List<Integer> accepted = new ArrayList<Integer>();
            for (Map.Entry<Integer, ContextControllerInstanceHandle> entry : partitionKeys.entrySet()) {
                identifierHash.setHash(entry.getKey());
                identifierHash.setContextPartitionId(entry.getValue().getContextPartitionOrPathId());
                if (filter.filter(identifierHash)) {
                    accepted.add(entry.getValue().getContextPartitionOrPathId());
                }
            }
            return accepted;
        }
View Full Code Here

        this.factory = factory;
    }

    public Collection<Integer> getSelectedContextPartitionPathIds(ContextPartitionSelector contextPartitionSelector) {
        if (contextPartitionSelector instanceof ContextPartitionSelectorFiltered) {
            ContextPartitionSelectorFiltered filter = (ContextPartitionSelectorFiltered) contextPartitionSelector;
            ContextPartitionIdentifierCategory identifier = new ContextPartitionIdentifierCategory();
            List<Integer> accepted = new ArrayList<Integer>();
            for (Map.Entry<Integer, ContextControllerInstanceHandle> entry : handleCategories.entrySet()) {
                identifier.setContextPartitionId(entry.getValue().getContextPartitionOrPathId());
                identifier.setLabel(factory.getCategorySpec().getItems().get(entry.getKey()).getName());
                if (filter.filter(identifier)) {
                    accepted.add(entry.getValue().getContextPartitionOrPathId());
                }
            }
            return accepted;
        }
View Full Code Here

                endpoint, this, filterAddendum, isStartEndpoint, subPathId);
    }

    public Collection<Integer> getSelectedContextPartitionPathIds(ContextPartitionSelector contextPartitionSelector) {
        if (contextPartitionSelector instanceof ContextPartitionSelectorFiltered) {
            ContextPartitionSelectorFiltered filter = (ContextPartitionSelectorFiltered) contextPartitionSelector;
            ContextPartitionIdentifierInitiatedTerminated identifier = new ContextPartitionIdentifierInitiatedTerminated();
            List<Integer> accepted = new ArrayList<Integer>();
            for (Map.Entry<ContextControllerCondition, ContextControllerInitTermInstance> entry : endConditions.entrySet()) {
                identifier.setEndTime(entry.getValue().getEndTime());
                identifier.setStartTime(entry.getValue().getStartTime());
                identifier.setProperties(entry.getValue().getStartProperties());
                identifier.setContextPartitionId(entry.getValue().getInstanceHandle().getContextPartitionOrPathId());
                if (filter.filter(identifier)) {
                    accepted.add(entry.getValue().getInstanceHandle().getContextPartitionOrPathId());
                }
            }
            return accepted;
        }
View Full Code Here

                return Collections.singleton(hash.getHashes().iterator().next());
            }
            return new ArrayList<Integer>(hash.getHashes());
        }
        if (contextPartitionSelector instanceof ContextPartitionSelectorFiltered) {
            ContextPartitionSelectorFiltered filter = (ContextPartitionSelectorFiltered) contextPartitionSelector;
            ContextPartitionIdentifierHash identifierHash = new ContextPartitionIdentifierHash();
            List<Integer> accepted = new ArrayList<Integer>();
            for (Map.Entry<Integer, ContextControllerInstanceHandle> entry : partitionKeys.entrySet()) {
                identifierHash.setHash(entry.getKey());
                identifierHash.setContextPartitionId(entry.getValue().getContextPartitionOrPathId());
                if (filter.filter(identifierHash)) {
                    accepted.add(entry.getValue().getContextPartitionOrPathId());
                }
            }
            return accepted;
        }
View Full Code Here

TOP

Related Classes of com.espertech.esper.client.context.ContextPartitionSelectorFiltered

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.