Package com.espertech.esper.client.context

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


        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());
                }
View Full Code Here


        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());
                }
View Full Code Here

        return new ContextControllerPartitioned(pathId, callback, this);
    }

    public ContextPartitionIdentifier keyPayloadToIdentifier(Object payload) {
        if (payload instanceof Object[]) {
            return new ContextPartitionIdentifierPartitioned((Object[]) payload);
        }
        if (payload instanceof MultiKeyUntyped) {
            return new ContextPartitionIdentifierPartitioned(((MultiKeyUntyped) payload).getKeys());
        }
        return new ContextPartitionIdentifierPartitioned(new Object[] {payload});
    }
View Full Code Here

        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());
                }
View Full Code Here

TOP

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

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.