当前位置: 首页>>代码示例>>Java>>正文


Java EPStatementAgentInstanceHandle.internalDispatch方法代码示例

本文整理汇总了Java中com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle.internalDispatch方法的典型用法代码示例。如果您正苦于以下问题:Java EPStatementAgentInstanceHandle.internalDispatch方法的具体用法?Java EPStatementAgentInstanceHandle.internalDispatch怎么用?Java EPStatementAgentInstanceHandle.internalDispatch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle的用法示例。


在下文中一共展示了EPStatementAgentInstanceHandle.internalDispatch方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processStatementFilterMultiple

import com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle; //导入方法依赖的package包/类
/**
 * Processing multiple filter matches for a statement.
 *
 * @param handle       statement handle
 * @param callbackList object containing callbacks
 * @param theEvent     to process
 */
public void processStatementFilterMultiple(EPStatementAgentInstanceHandle handle, ArrayDeque<FilterHandleCallback> callbackList, EventBean theEvent) {
    handle.getStatementAgentInstanceLock().acquireWriteLock();
    try {
        if (handle.isHasVariables()) {
            unisolatedServices.getVariableService().setLocalVersion();
        }

        handle.getMultiMatchHandler().handle(callbackList, theEvent);

        // internal join processing, if applicable
        handle.internalDispatch();
    } catch (RuntimeException ex) {
        unisolatedServices.getExceptionHandlingService().handleException(ex, handle, ExceptionHandlerExceptionType.PROCESS, theEvent);
    } finally {
        if (handle.isHasTableAccess()) {
            unisolatedServices.getTableService().getTableExprEvaluatorContext().releaseAcquiredLocks();
        }
        handle.getStatementAgentInstanceLock().releaseWriteLock();
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:28,代码来源:EPRuntimeIsolatedImpl.java

示例2: processStatementFilterSingle

import com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle; //导入方法依赖的package包/类
/**
 * Process a single match.
 *
 * @param handle         statement
 * @param handleCallback callback
 * @param theEvent       event to indicate
 */
public void processStatementFilterSingle(EPStatementAgentInstanceHandle handle, EPStatementHandleCallback handleCallback, EventBean theEvent) {
    handle.getStatementAgentInstanceLock().acquireWriteLock();
    try {
        if (handle.isHasVariables()) {
            unisolatedServices.getVariableService().setLocalVersion();
        }

        handleCallback.getFilterCallback().matchFound(theEvent, null);

        // internal join processing, if applicable
        handle.internalDispatch();
    } catch (RuntimeException ex) {
        unisolatedServices.getExceptionHandlingService().handleException(ex, handle, ExceptionHandlerExceptionType.PROCESS, theEvent);
    } finally {
        if (handle.isHasTableAccess()) {
            unisolatedServices.getTableService().getTableExprEvaluatorContext().releaseAcquiredLocks();
        }
        handleCallback.getAgentInstanceHandle().getStatementAgentInstanceLock().releaseWriteLock();
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:28,代码来源:EPRuntimeIsolatedImpl.java

示例3: processHandleMultiple

import com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle; //导入方法依赖的package包/类
private void processHandleMultiple(EPStatementAgentInstanceHandle handle, Map<NamedWindowConsumerView, NamedWindowDeltaData> deltaPerConsumer, ExprEvaluatorContext exprEvaluatorContext) {
    handle.getStatementAgentInstanceLock().acquireWriteLock(statementLockFactory);
    try
    {
        if (handle.isHasVariables())
        {
            variableService.setLocalVersion();
        }
        for (Map.Entry<NamedWindowConsumerView, NamedWindowDeltaData> entryDelta : deltaPerConsumer.entrySet())
        {
            EventBean[] newData = entryDelta.getValue().getNewData();
            EventBean[] oldData = entryDelta.getValue().getOldData();
            entryDelta.getKey().update(newData, oldData);
        }

        // internal join processing, if applicable
        handle.internalDispatch(exprEvaluatorContext);
    }
    catch (RuntimeException ex) {
        exceptionHandlingService.handleException(ex, handle);
    }
    finally
    {
        handle.getStatementAgentInstanceLock().releaseWriteLock(null);
    }
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:27,代码来源:NamedWindowServiceImpl.java

示例4: processHandle

import com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle; //导入方法依赖的package包/类
private void processHandle(EPStatementAgentInstanceHandle handle, List<NamedWindowConsumerView> value, EventBean[] newData, EventBean[] oldData, ExprEvaluatorContext exprEvaluatorContext) {
    handle.getStatementAgentInstanceLock().acquireWriteLock(statementLockFactory);
    try
    {
        if (handle.isHasVariables())
        {
            variableService.setLocalVersion();
        }

        for (NamedWindowConsumerView consumerView : value)
        {
            consumerView.update(newData, oldData);
        }

        // internal join processing, if applicable
        handle.internalDispatch(exprEvaluatorContext);
    }
    catch (RuntimeException ex) {
        exceptionHandlingService.handleException(ex, handle);
    }
    finally
    {
        handle.getStatementAgentInstanceLock().releaseWriteLock(null);
    }
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:26,代码来源:NamedWindowServiceImpl.java

示例5: processStatementFilterSingle

import com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle; //导入方法依赖的package包/类
/**
 * Process a single match.
 * @param handle statement
 * @param handleCallback callback
 * @param theEvent event to indicate
 */
public void processStatementFilterSingle(EPStatementAgentInstanceHandle handle, EPStatementHandleCallback handleCallback, EventBean theEvent)
{
    handle.getStatementAgentInstanceLock().acquireWriteLock(unisolatedServices.getStatementLockFactory());
    try
    {
        if (handle.isHasVariables())
        {
            unisolatedServices.getVariableService().setLocalVersion();
        }

        handleCallback.getFilterCallback().matchFound(theEvent, null);

        // internal join processing, if applicable
        handle.internalDispatch(isolatedTimeEvalContext);
    }
    catch (RuntimeException ex)
    {
        unisolatedServices.getExceptionHandlingService().handleException(ex, handle);
    }
    finally
    {
        handleCallback.getAgentInstanceHandle().getStatementAgentInstanceLock().releaseWriteLock(unisolatedServices.getStatementLockFactory());
    }
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:31,代码来源:EPRuntimeIsolatedImpl.java

示例6: processHandleMultiple

import com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle; //导入方法依赖的package包/类
private void processHandleMultiple(EPStatementAgentInstanceHandle handle, Map<NamedWindowConsumerView, NamedWindowDeltaData> deltaPerConsumer) {
    if (InstrumentationHelper.ENABLED) {
        InstrumentationHelper.get().qNamedWindowCPMulti(exceptionHandlingService.getEngineURI(), deltaPerConsumer, handle, schedulingService.getTime());
    }
    handle.getStatementAgentInstanceLock().acquireWriteLock();
    try {
        if (handle.isHasVariables()) {
            variableService.setLocalVersion();
        }
        for (Map.Entry<NamedWindowConsumerView, NamedWindowDeltaData> entryDelta : deltaPerConsumer.entrySet()) {
            EventBean[] newData = entryDelta.getValue().getNewData();
            EventBean[] oldData = entryDelta.getValue().getOldData();
            entryDelta.getKey().update(newData, oldData);
        }

        // internal join processing, if applicable
        handle.internalDispatch();
    } catch (RuntimeException ex) {
        exceptionHandlingService.handleException(ex, handle, ExceptionHandlerExceptionType.PROCESS, null);
    } finally {
        if (handle.isHasTableAccess()) {
            tableService.getTableExprEvaluatorContext().releaseAcquiredLocks();
        }
        handle.getStatementAgentInstanceLock().releaseWriteLock();
        if (InstrumentationHelper.ENABLED) {
            InstrumentationHelper.get().aNamedWindowCPMulti();
        }
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:30,代码来源:NamedWindowDispatchServiceImpl.java

示例7: processHandle

import com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle; //导入方法依赖的package包/类
private void processHandle(EPStatementAgentInstanceHandle handle, List<NamedWindowConsumerView> value, EventBean[] newData, EventBean[] oldData) {
    if (InstrumentationHelper.ENABLED) {
        InstrumentationHelper.get().qNamedWindowCPSingle(exceptionHandlingService.getEngineURI(), value, newData, oldData, handle, schedulingService.getTime());
    }
    handle.getStatementAgentInstanceLock().acquireWriteLock();
    try {
        if (handle.isHasVariables()) {
            variableService.setLocalVersion();
        }

        for (NamedWindowConsumerView consumerView : value) {
            consumerView.update(newData, oldData);
        }

        // internal join processing, if applicable
        handle.internalDispatch();
    } catch (RuntimeException ex) {
        exceptionHandlingService.handleException(ex, handle, ExceptionHandlerExceptionType.PROCESS, null);
    } finally {
        if (handle.isHasTableAccess()) {
            tableService.getTableExprEvaluatorContext().releaseAcquiredLocks();
        }
        handle.getStatementAgentInstanceLock().releaseWriteLock();
        if (InstrumentationHelper.ENABLED) {
            InstrumentationHelper.get().aNamedWindowCPSingle();
        }
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:29,代码来源:NamedWindowDispatchServiceImpl.java

示例8: processStatementFilterSingle

import com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle; //导入方法依赖的package包/类
/**
 * Process a single match.
 *  @param handle         statement
 * @param handleCallback callback
 * @param theEvent       event to indicate
 * @param version        filter version
 * @param filterFaultCount filter fault count
 */
public void processStatementFilterSingle(EPStatementAgentInstanceHandle handle, EPStatementHandleCallback handleCallback, EventBean theEvent, long version, int filterFaultCount) {
    if (InstrumentationHelper.ENABLED) {
        InstrumentationHelper.get().qEventCP(theEvent, handle, services.getSchedulingService().getTime());
    }
    handle.getStatementAgentInstanceLock().acquireWriteLock();
    try {
        if (handle.isHasVariables()) {
            services.getVariableService().setLocalVersion();
        }
        if (!handle.isCurrentFilter(version)) {
            boolean handled = false;
            if (handle.getFilterFaultHandler() != null) {
                handled = handle.getFilterFaultHandler().handleFilterFault(theEvent, version);
            }
            if (!handled && filterFaultCount < MAX_FILTER_FAULT_COUNT) {
                handleFilterFault(handle, theEvent, filterFaultCount);
            }
        } else {
            handleCallback.getFilterCallback().matchFound(theEvent, null);
        }

        // internal join processing, if applicable
        handle.internalDispatch();
    } catch (RuntimeException ex) {
        services.getExceptionHandlingService().handleException(ex, handle, ExceptionHandlerExceptionType.PROCESS, theEvent);
    } finally {
        if (handle.isHasTableAccess()) {
            services.getTableService().getTableExprEvaluatorContext().releaseAcquiredLocks();
        }
        handleCallback.getAgentInstanceHandle().getStatementAgentInstanceLock().releaseWriteLock();
        if (InstrumentationHelper.ENABLED) {
            InstrumentationHelper.get().aEventCP();
        }
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:44,代码来源:EPRuntimeImpl.java

示例9: processStatementFilterSingle

import com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle; //导入方法依赖的package包/类
/**
 * Process a single match.
 * @param handle statement
 * @param handleCallback callback
 * @param theEvent event to indicate
 * @param version filter version
 */
public void processStatementFilterSingle(EPStatementAgentInstanceHandle handle, EPStatementHandleCallback handleCallback, EventBean theEvent, long version)
{
    handle.getStatementAgentInstanceLock().acquireWriteLock(services.getStatementLockFactory());
    try
    {
        if (handle.isHasVariables())
        {
            services.getVariableService().setLocalVersion();
        }
        if (!handle.isCurrentFilter(version)) {
            if (handle.getFilterFaultHandler() != null) {
                handle.getFilterFaultHandler().handleFilterFault(theEvent, version);
            }

            ArrayDeque<FilterHandle> callbackList = getCallbackList(theEvent, handle.getStatementId());
            for (FilterHandle callback : callbackList)
            {
                EPStatementHandleCallback handleCallbackFilter = (EPStatementHandleCallback) callback;
                handleCallbackFilter.getFilterCallback().matchFound(theEvent, null);
            }
        }
        else {
            handleCallback.getFilterCallback().matchFound(theEvent, null);
        }

        // internal join processing, if applicable
        handle.internalDispatch(engineFilterAndDispatchTimeContext);
    }
    catch (RuntimeException ex) {
        services.getExceptionHandlingService().handleException(ex, handle);
    }
    finally
    {
        handleCallback.getAgentInstanceHandle().getStatementAgentInstanceLock().releaseWriteLock(services.getStatementLockFactory());
    }
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:44,代码来源:EPRuntimeImpl.java

示例10: processStatementFilterMultiple

import com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle; //导入方法依赖的package包/类
/**
 * Processing multiple filter matches for a statement.
 *  @param handle       statement handle
 * @param callbackList object containing callbacks
 * @param theEvent     to process
 * @param version      filter version
 * @param filterFaultCount filter fault count
 */
public void processStatementFilterMultiple(EPStatementAgentInstanceHandle handle, Object callbackList, EventBean theEvent, long version, int filterFaultCount) {
    if (InstrumentationHelper.ENABLED) {
        InstrumentationHelper.get().qEventCP(theEvent, handle, services.getSchedulingService().getTime());
    }
    handle.getStatementAgentInstanceLock().acquireWriteLock();
    try {
        if (handle.isHasVariables()) {
            services.getVariableService().setLocalVersion();
        }
        if (!handle.isCurrentFilter(version)) {
            boolean handled = false;
            if (handle.getFilterFaultHandler() != null) {
                handled = handle.getFilterFaultHandler().handleFilterFault(theEvent, version);
            }
            if (!handled && filterFaultCount < MAX_FILTER_FAULT_COUNT) {
                handleFilterFault(handle, theEvent, filterFaultCount);
            }
        } else {
            if (callbackList instanceof Collection) {
                Collection<FilterHandleCallback> callbacks = (Collection<FilterHandleCallback>) callbackList;
                handle.getMultiMatchHandler().handle(callbacks, theEvent);
            } else {
                FilterHandleCallback single = (FilterHandleCallback) callbackList;
                single.matchFound(theEvent, null);
            }

            // internal join processing, if applicable
            handle.internalDispatch();
        }
    } catch (RuntimeException ex) {
        services.getExceptionHandlingService().handleException(ex, handle, ExceptionHandlerExceptionType.PROCESS, theEvent);
    } finally {
        if (handle.isHasTableAccess()) {
            services.getTableService().getTableExprEvaluatorContext().releaseAcquiredLocks();
        }
        handle.getStatementAgentInstanceLock().releaseWriteLock();
        if (InstrumentationHelper.ENABLED) {
            InstrumentationHelper.get().aEventCP();
        }
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:50,代码来源:EPRuntimeImpl.java


注:本文中的com.espertech.esper.core.context.util.EPStatementAgentInstanceHandle.internalDispatch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。