Package com.espertech.esper.core.service

Examples of com.espertech.esper.core.service.EPStatementHandleCallback


                OutputConditionExpression.this.isCallbackScheduled = false;
                OutputConditionExpression.this.outputCallback.continueOutputProcessing(true, true);
                resetBuiltinProperties();
            }
        };
        scheduleHandle = new EPStatementHandleCallback(agentInstanceContext.getEpStatementAgentInstanceHandle(), callback);
        agentInstanceContext.getStatementContext().getSchedulingService().add(0, scheduleHandle, scheduleSlot);
        agentInstanceContext.getTerminationCallbacks().add(this);

        // execute assignments
        if (parent.getVariableReadWritePackage() != null)
View Full Code Here


                {
                    return isSubSelect;
                }
            };
        }
        EPStatementHandleCallback filterHandle = new EPStatementHandleCallback(agentInstanceContext.getEpStatementAgentInstanceHandle(), filterCallback);

        List<FilterValueSetParam> addendum = null;
        if (agentInstanceContext.getAgentInstanceFilterProxy() != null) {
            addendum = agentInstanceContext.getAgentInstanceFilterProxy().getAddendumFilters(filterSpec);
        }
View Full Code Here

            // schedule a termination callback unless it is already scheduled
            if (scheduleAndContext.getContextScheduleCallbackHandle() == null) {
                ScheduleSlot scheduleSlot = createContextContext.getStatementContext().getScheduleBucket().allocateSlot();
                long timeOffset = servicesContext.getSchedulingService().getTime() - scheduleAndContext.getStartTime();
                EPStatementHandleCallback callback = scheduleCallback(agentInstanceId, scheduleSlot, timeOffset);
                scheduleAndContext.setContextScheduleCallbackHandle(callback, scheduleSlot);
            }
        }
    }
View Full Code Here

                public boolean isSubSelect() {
                    return false;
                }
            };
            filterHandle = new EPStatementHandleCallback(createContextContext.getEpStatementAgentInstanceHandle(), filterCallback);
            FilterValueSet filterValueSet = overlapSpec.getInitiatedFilterCompiled().getValueSet(null, null, null);
            servicesContext.getFilterService().add(filterValueSet, filterHandle);
        }
    }
View Full Code Here

        // save state if required
        contextStateService.addContext(contextName, agentInstanceId, scheduleAndContext, contextStateServiceBinding);

        // schedule callback, save for removal
        ScheduleSlot scheduleSlot = createContextContext.getStatementContext().getScheduleBucket().allocateSlot();
        EPStatementHandleCallback scheduleHandle = scheduleCallback(agentInstanceId, scheduleSlot, 0);
        scheduleAndContext.setContextScheduleCallbackHandle(scheduleHandle, scheduleSlot);

        // for all current statements, start an instance
        for (ContextManagedStatementBase statement : statements.values()) {
View Full Code Here

            }
        };

        // callback for expiry
        EPStatementAgentInstanceHandle agentHandle = new EPStatementAgentInstanceHandle(createContextContext.getStatementContext().getEpStatementHandle(), createContextContext.getStatementContext().getDefaultAgentInstanceLock(), null, new StatementAgentInstanceFilterVersion());
        EPStatementHandleCallback contextScheduleCallbackHandle = new EPStatementHandleCallback(agentHandle, callback);
        Double interval = (Double) overlapSpec.getTerminatedTimePeriod().evaluate(null, true, createContextContext);
        if (interval == null) {
            log.warn("Time period expression in context '" + contextName + "' returned a null value, not scheduling time period");
        }
        else {
View Full Code Here

    public ContextManagerPartitionedFilterCallback(EPServicesContext servicesContext, AgentInstanceContext agentInstanceContextCreateContext, ContextDetailPartitionItem partitionItem, ContextManagerPartitionedInstanceCreateCallback callback) {
        this.agentInstanceContextCreateContext = agentInstanceContextCreateContext;
        this.callback = callback;

        filterHandle = new EPStatementHandleCallback(agentInstanceContextCreateContext.getEpStatementAgentInstanceHandle(), this);

        getters = new EventPropertyGetter[partitionItem.getPropertyNames().size()];
        for (int i = 0; i < partitionItem.getPropertyNames().size(); i++) {
            String propertyName = partitionItem.getPropertyNames().get(i);
            EventPropertyGetter getter = partitionItem.getFilterSpecCompiled().getFilterForEventType().getGetter(propertyName);
View Full Code Here

                public void scheduledTrigger(ExtensionServicesContext extensionServicesContext)
                {
                    EventRowRegexNFAView.this.triggered();
                }
            };
            handle = new EPStatementHandleCallback(agentInstanceContext.getEpStatementAgentInstanceHandle(), callback);
            schedule = new TreeMap<Long, Object>();

            agentInstanceContext.getTerminationCallbacks().add(this);
        }
        else
View Full Code Here

    }

    private void startFiltering()
    {
        FilterService filterService = evalFilterNode.getContext().getPatternContext().getFilterService();
        handle = new EPStatementHandleCallback(evalFilterNode.getContext().getAgentInstanceContext().getEpStatementAgentInstanceHandle(), this);
        FilterValueSet filterValues = evalFilterNode.getFactoryNode().getFilterSpec().getValueSet(beginState, evalFilterNode.getContext().getAgentInstanceContext(), evalFilterNode.getAddendumFilters());
        filterService.add(filterValues, handle);
        long filtersVersion = filterService.getFiltersVersion();
        evalFilterNode.getContext().getAgentInstanceContext().getEpStatementAgentInstanceHandle().getStatementFilterVersion().setStmtFilterVersion(filtersVersion);
    }
View Full Code Here

            public void scheduledTrigger(ExtensionServicesContext extensionServicesContext)
            {
                TimeBatchView.this.sendBatch();
            }
        };
        handle = new EPStatementHandleCallback(agentInstanceContext.getEpStatementAgentInstanceHandle(), callback);
        agentInstanceContext.getStatementContext().getSchedulingService().add(afterMSec, handle, scheduleSlot);
    }
View Full Code Here

TOP

Related Classes of com.espertech.esper.core.service.EPStatementHandleCallback

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.