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