Package com.espertech.esper.collection

Examples of com.espertech.esper.collection.MultiKeyUntyped


        }
        next.enter(event, innerIndex);
    }

    public void remove(EventBean event, Map parent) {
        MultiKeyUntyped mk = EventBeanUtility.getMultiKey(event, propertyGetters, keyCoercionTypes);
        Map innerIndex = (Map) parent.get(mk);
        if (innerIndex == null) {
            return;
        }
        next.remove(event, innerIndex);
View Full Code Here


     * @return MultiKey with property values
     */
    public static MultiKeyUntyped getMultiKey(EventBean event, EventPropertyGetter[] propertyGetters)
    {
        Object[] keyValues = getPropertyArray(event, propertyGetters);
        return new MultiKeyUntyped(keyValues);
    }
View Full Code Here

    }

    public static MultiKeyUntyped getMultiKey(EventBean event, EventPropertyGetter[] propertyGetters, Class[] coercionTypes) {
        Object[] keyValues = getPropertyArray(event, propertyGetters);
        if (coercionTypes == null) {
            return new MultiKeyUntyped(keyValues);
        }
        for (int i = 0; i < coercionTypes.length; i++)
        {
            Object key = keyValues[i];
            if ((key != null) && (!key.getClass().equals(coercionTypes[i])))
            {
                if (key instanceof Number)
                {
                    key = JavaClassHelper.coerceBoxed((Number) key, coercionTypes[i]);
                    keyValues[i] = key;
                }
            }
        }
        return new MultiKeyUntyped(keyValues);
    }
View Full Code Here

    }

    public static MultiKeyUntyped getMultiKey(EventBean[] eventsPerStream, ExprEvaluator[] evaluators, ExprEvaluatorContext context, Class[] coercionTypes) {
        Object[] keyValues = getPropertyArray(eventsPerStream, evaluators, context);
        if (coercionTypes == null) {
            return new MultiKeyUntyped(keyValues);
        }
        for (int i = 0; i < coercionTypes.length; i++)
        {
            Object key = keyValues[i];
            if ((key != null) && (!key.getClass().equals(coercionTypes[i])))
            {
                if (key instanceof Number)
                {
                    key = JavaClassHelper.coerceBoxed((Number) key, coercionTypes[i]);
                    keyValues[i] = key;
                }
            }
        }
        return new MultiKeyUntyped(keyValues);
    }
View Full Code Here

    }

    public static MultiKeyUntyped getMultiKey(EventBean[] eventPerStream, EventPropertyGetter[] propertyGetters, int[] keyStreamNums, Class[] coercionTypes) {
        Object[] keyValues = getPropertyArray(eventPerStream, propertyGetters, keyStreamNums);
        if (coercionTypes == null) {
            return new MultiKeyUntyped(keyValues);
        }
        coerce(keyValues, coercionTypes);
        return new MultiKeyUntyped(keyValues);
    }
View Full Code Here

        this.next = next;
    }

    public Set<EventBean> get(EventBean event, Map parent, ExprEvaluatorContext context) {
        events[lookupStream] = event;
        MultiKeyUntyped mk = EventBeanUtility.getMultiKey(events, evaluators, context, keyCoercionTypes);
        Map innerIndex = (Map) parent.get(mk);
        if (innerIndex == null) {
            return null;
        }
        return next.get(event, innerIndex, context);
View Full Code Here

        else {
            System.arraycopy(eventsPerStream, 0, events, 1, eventsPerStream.length);
            eventsToUse = events;
        }

        MultiKeyUntyped mk = EventBeanUtility.getMultiKey(eventsToUse, evaluators, context, keyCoercionTypes);
        Map innerIndex = (Map) parent.get(mk);
        if (innerIndex == null) {
            return null;
        }
        return next.get(eventsPerStream, innerIndex, context);
View Full Code Here

    public void setNext(CompositeIndexLookup next) {
        this.next = next;
    }

    public void lookup(Map parent, Set<EventBean> result) {
        MultiKeyUntyped mk = new MultiKeyUntyped(keys);
        Map innerIndex = (Map) parent.get(mk);
        if (innerIndex == null) {
            return;
        }
        next.lookup(innerIndex, result);       
View Full Code Here

    }

    public final void evaluateTrue(MatchedEventMap matchEvent, EvalStateNode fromNode, boolean isQuitted)
    {
        // determine if this evaluation has been seen before from the same node
        MultiKeyUntyped matchEventKey = PatternExpressionUtil.getKeys(matchEvent, everyNode);
        boolean haveSeenThis = false;
        LinkedHashMap<MultiKeyUntyped, Long> keysFromNode = spawnedNodes.get(fromNode);
        if (keysFromNode != null)
        {
            // Clean out old keys
View Full Code Here

        Object[] values = new Object[criteriaEvaluators.length];
        for (int i = 0; i < criteriaEvaluators.length; i++)
        {
            values[i] = criteriaEvaluators[i].evaluate(eventsPerStream, true, agentInstanceContext);
        }
        return new MultiKeyUntyped(values);
    }
View Full Code Here

TOP

Related Classes of com.espertech.esper.collection.MultiKeyUntyped

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.