Package com.espertech.esper.event

Examples of com.espertech.esper.event.NaturalEventBean


    {
        try
        {
            if (statementResultService.isMakeNatural())
            {
                NaturalEventBean natural = new NaturalEventBean(eventType, new Object[] {newEvent.getUnderlying()}, newEvent);
                NaturalEventBean naturalOld = new NaturalEventBean(eventType, new Object[] {oldEvent.getUnderlying()}, oldEvent);
                this.updateChildren(new NaturalEventBean[]{natural}, new NaturalEventBean[]{naturalOld});
            }
            else
            {
                this.updateChildren(new EventBean[]{newEvent}, new EventBean[]{oldEvent});
View Full Code Here


    private void route(EventBean[] events, ExprEvaluatorContext exprEvaluatorContext)
    {
        for (EventBean routed : events) {
            if (routed instanceof NaturalEventBean) {
                NaturalEventBean natural = (NaturalEventBean) routed;
                parent.getInternalEventRouter().route(natural.getOptionalSynthetic(), parent.getEpStatementHandle(), agentInstanceContext.getStatementContext().getInternalEventEngineRouteDest(), exprEvaluatorContext, parent.isAddToFront());
            } else {
                parent.getInternalEventRouter().route(routed, parent.getEpStatementHandle(), agentInstanceContext.getStatementContext().getInternalEventEngineRouteDest(), exprEvaluatorContext, parent.isAddToFront());
            }
        }
    }
View Full Code Here

        {
            return null; // neither synthetic nor natural required, be cheap and generate no output event
        }

        Object[] parameters = bindProcessor.process(eventsPerStream, isNewData, this.exprEvaluatorContext);
        return new NaturalEventBean(syntheticEventType, parameters, syntheticEvent);
    }
View Full Code Here

    private void route(EventBean[] events, ExprEvaluatorContext exprEvaluatorContext)
    {
        for (EventBean routed : events) {
            if (routed instanceof NaturalEventBean) {
                NaturalEventBean natural = (NaturalEventBean) routed;
                if (audit) {
                    AuditPath.auditInsertInto(agentInstanceContext.getEngineURI(), agentInstanceContext.getStatementName(), natural.getOptionalSynthetic());
                }
                parent.getInternalEventRouter().route(natural.getOptionalSynthetic(), parent.getEpStatementHandle(), agentInstanceContext.getStatementContext().getInternalEventEngineRouteDest(), exprEvaluatorContext, parent.isAddToFront());
            }
            else {
                if (audit) {
                    AuditPath.auditInsertInto(agentInstanceContext.getEngineURI(), agentInstanceContext.getStatementName(), routed);
                }
View Full Code Here

        int length = 0;
        for (int i = 0; i < events.length; i++)
        {
            if (events[i] instanceof NaturalEventBean)
            {
                NaturalEventBean natural = (NaturalEventBean) events[i];
                Array.set(array, length, natural.getNatural()[0]);
                length++;
            }
        }

        if (length == 0)
View Full Code Here

        int length = 0;
        for (int i = 0; i < result.length; i++)
        {
            if (events[i] instanceof NaturalEventBean)
            {
                NaturalEventBean natural = (NaturalEventBean) events[i];
                result[length] = natural.getNatural();
                length++;
            }
        }

        if (length == 0)
View Full Code Here

        if ((newData != null) && (newData.length > 0)) {
            for (int i = 0; i < newData.length; i++) {
                EventBean event = newData[i];
                if (event instanceof NaturalEventBean) {
                    NaturalEventBean natural = (NaturalEventBean) event;
                    Object[] params = deliveryConvertor.convertRow(natural.getNatural());
                    try {
                        updateFastMethod.invoke(subscriber, params);
                    }
                    catch (InvocationTargetException e) {
                        handle(statementName, log, e, params, subscriber, updateFastMethod);
                    }
                    catch (Throwable t) {
                        handleThrowable(log, t, params, subscriber, updateFastMethod);
                    }
                }
            }
        }

        if ((updateRStreamFastMethod != null) && (oldData != null) && (oldData.length > 0)) {
            for (int i = 0; i < oldData.length; i++) {
                EventBean event = oldData[i];
                if (event instanceof NaturalEventBean) {
                    NaturalEventBean natural = (NaturalEventBean) event;
                    Object[] params = deliveryConvertor.convertRow(natural.getNatural());
                    try {
                        updateRStreamFastMethod.invoke(subscriber, params);
                    }
                    catch (InvocationTargetException e) {
                        handle(statementName, log, e, params, subscriber, updateRStreamFastMethod);
View Full Code Here

        int length = 0;
        for (int i = 0; i < result.length; i++)
        {
            if (events[i] instanceof NaturalEventBean)
            {
                NaturalEventBean natural = (NaturalEventBean) events[i];
                result[length] = convert(natural);
                length++;
            }
        }
View Full Code Here

        int length = 0;
        for (int i = 0; i < result.length; i++)
        {
            if (events[i] instanceof NaturalEventBean)
            {
                NaturalEventBean natural = (NaturalEventBean) events[i];
                result[length] = convert(natural);
                length++;
            }
        }
View Full Code Here

    private void route(EventBean[] events, ExprEvaluatorContext exprEvaluatorContext)
    {
        for (EventBean routed : events) {
            if (routed instanceof NaturalEventBean) {
                NaturalEventBean natural = (NaturalEventBean) routed;
                internalEventRouter.route(natural.getOptionalSynthetic(), epStatementHandle, statementContext.getInternalEventEngineRouteDest(), exprEvaluatorContext, addToFront);
            } else {
                internalEventRouter.route(routed, epStatementHandle, statementContext.getInternalEventEngineRouteDest(), exprEvaluatorContext, addToFront);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.espertech.esper.event.NaturalEventBean

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.