Package com.espertech.esper.client

Examples of com.espertech.esper.client.EventBean


        }
        Object array = Array.newInstance(componentType, access.size());
        Iterator<EventBean> it = access.iterator();
        int count = 0;
        for (;it.hasNext();) {
            EventBean bean = it.next();
            eventsPerStream[streamNum] = bean;
            Object value = childNode.evaluate(eventsPerStream, true, null);
            Array.set(array, count++, value);
        }
View Full Code Here


            namedWindowRootView.updateChildren(null, oldData);
            return;
        }

        RevisionEventBeanDeclared revisionEvent = (RevisionEventBeanDeclared) newData[0];
        EventBean underlyingEvent = revisionEvent.getUnderlyingFullOrDelta();
        EventType underyingEventType = underlyingEvent.getEventType();

        // obtain key values
        MultiKeyUntyped key = null;
        RevisionTypeDesc typesDesc = null;
        boolean isBaseEventType = false;
View Full Code Here

            return target;
        }

        Collection<EventBean> beans = (Collection<EventBean>) target;
        if (target.size() == 1) {
            EventBean item = beans.iterator().next();
            eventsLambda[streamNumLambda] = item;

            Object pass = innerExpression.evaluate(eventsLambda, isNewData, context);
            if (pass == null || (!(Boolean) pass)) {
                return Collections.emptyList();
View Full Code Here

    }

    public EventBean copy(EventBean event)
    {
        DecoratingEventBean decorated = (DecoratingEventBean) event;
        EventBean decoratedUnderlying = decorated.getUnderlyingEvent();
        Map<String, Object> copiedMap = new HashMap<String, Object>(decorated.getDecoratingProperties());
        return eventAdapterService.adaptorForTypedWrapper(decoratedUnderlying, copiedMap, wrapperEventType);       
    }
View Full Code Here

        if (oldData != null)
        {
            boolean isOutOfSequenceRemove = false;

            EventBean first = null;
            if (!windowMatchedEventset.isEmpty())
            {
                first = windowMatchedEventset.iterator().next();
            }
View Full Code Here

        List<RegexNFAStateEntry> endStates = new ArrayList<RegexNFAStateEntry>();
        List<RegexNFAStateEntry> nextStates = new ArrayList<RegexNFAStateEntry>();
        List<RegexNFAStateEntry> currentStates;
        int eventSequenceNumber = 0;

        EventBean event;
        for (;events.hasNext();)
        {
            event = events.next();
            eventSequenceNumber++;

            RegexPartitionState partitionState = regexPartitionStateRepo.getState(event, false);
            currentStates = partitionState.getCurrentStates();

            // add start states for each new event
            for (RegexNFAState startState : startStates)
            {
                long time = 0;
                if (matchRecognizeSpec.getInterval() != null)
                {
                    time = statementContext.getSchedulingService().getTime();
                }
                currentStates.add(new RegexNFAStateEntry(eventSequenceNumber, time, startState, new EventBean[variableStreams.size()], new int[allStates.length], null, partitionState.getOptionalKeys()));
            }

            if (partitionState.getRandomAccess() != null)
            {
                partitionState.getRandomAccess().existingEventPrepare(event);
            }

            if ((ExecutionPathDebugLog.isDebugEnabled) && (log.isDebugEnabled()) || (IS_DEBUG))
            {
                log.info("Evaluating event " + event.getUnderlying() + "\n" +
                    "current : " + printStates(currentStates));
            }

            step(currentStates, event, nextStates, endStates, false, eventSequenceNumber, partitionState.getOptionalKeys());

            if ((ExecutionPathDebugLog.isDebugEnabled) && (log.isDebugEnabled()) || (IS_DEBUG))
            {
                log.info("Evaluating event " + event.getUnderlying() + "\n" +
                    "next : " + printStates(nextStates) + "\n" +
                    "end : " + printStates(endStates));
            }

            partitionState.setCurrentStates(nextStates);
View Full Code Here

                        aggregationService.applyEnter(eventsPerStream, i, statementContext);
                    }
                }
            }
        }
        EventBean rowRaw = statementContext.getEventAdapterService().adaptorForTypedMap(rowDataRaw, compositeEventType);

        Map<String, Object> row = new HashMap<String, Object>();
        int columnNum = 0;
        for (ExprEvaluator expression : columnEvaluators)
        {
View Full Code Here

                {
                    log.warn("Property '" + nestedProp.getName() + "' expected to return EventBean and returned " + value.getClass() + " instead");
                    buf.append("null");
                    continue;
                }
                EventBean nestedEventBean = (EventBean) value;
                buf.append('{');
                buf.append(NEWLINE);
               
                recursiveRender(nestedEventBean, buf, level + 1, nestedProp.getMetadata(), rendererOptions);

                ident(buf, level);
                buf.append('}');
            }
            else
            {
                if (!(value instanceof EventBean[]))
                {
                    log.warn("Property '" + nestedProp.getName() + "' expected to return EventBean[] and returned " + value.getClass() + " instead");
                    buf.append("null");
                    continue;
                }


                StringBuilder arrayDelimiterBuf = new StringBuilder();
                arrayDelimiterBuf.append(',');
                arrayDelimiterBuf.append(NEWLINE);
                ident(arrayDelimiterBuf, level + 1);

                EventBean[] nestedEventArray = (EventBean[]) value;
                String arrayDelimiter = "";
                buf.append('[');
               
                for (int i = 0; i < nestedEventArray.length; i++)
                {
                    EventBean arrayItem = nestedEventArray[i];
                    buf.append(arrayDelimiter);
                    arrayDelimiter = arrayDelimiterBuf.toString();

                    buf.append('{');
                    buf.append(NEWLINE);
View Full Code Here

                {
                    log.warn("Property '" + nestedProp.getName() + "' expected to return EventBean and returned " + value.getClass() + " instead");
                    buf.append("null");
                    continue;
                }
                EventBean nestedEventBean = (EventBean) value;
                renderAttInner(buf, level, nestedEventBean, nestedProp);
            }
            else
            {
                if (!(value instanceof EventBean[]))
                {
                    log.warn("Property '" + nestedProp.getName() + "' expected to return EventBean[] and returned " + value.getClass() + " instead");
                    buf.append("null");
                    continue;
                }

                EventBean[] nestedEventArray = (EventBean[]) value;
                for (int i = 0; i < nestedEventArray.length; i++)
                {
                    EventBean arrayItem = nestedEventArray[i];
                    renderAttInner(buf, level, arrayItem, nestedProp);
                }
            }
        }
View Full Code Here

                }

                EventBean[] nestedEventArray = (EventBean[]) value;
                for (int i = 0; i < nestedEventArray.length; i++)
                {
                    EventBean arrayItem = nestedEventArray[i];
                    if (arrayItem == null)
                    {
                        continue;
                    }
                    renderElementFragment(arrayItem, buf, level, nestedProp, rendererMetaOptions);
View Full Code Here

TOP

Related Classes of com.espertech.esper.client.EventBean

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.