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); } }
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); } }
@Override public boolean evaluate(EventBean theEvent) { variableService.setLocalVersion(); return evaluatePerStream(new EventBean[] {theEvent}); }