/** * Processes the next input event. If some of the computations reach a final state then the * resulting event sequences are returned. If computations time out and timeout handling is * activated, then the timed out event patterns are returned. * * <p>If computations reach a stop state, the path forward is discarded and currently constructed path is returned * with the element that resulted in the stop state. * * @param sharedBufferAccessor the accessor to SharedBuffer object that we need to work upon while processing * @param nfaState The NFAState object that we need to affect while processing * @param event The current event to be processed or null if only pruning shall be done * @param timestamp The timestamp of the current event * @param afterMatchSkipStrategy The skip strategy to use after per match * @param timerService gives access to processing time and time characteristic, needed for condition evaluation * @return Tuple of the collection of matched patterns (e.g. the result of computations which have * reached a final state) and the collection of timed out patterns (if timeout handling is * activated) * @throws Exception Thrown if the system cannot access the state. */ public Collection<Map<String, List<T>>> process( final SharedBufferAccessor<T> sharedBufferAccessor, final NFAState nfaState, final T event, final long timestamp, final AfterMatchSkipStrategy afterMatchSkipStrategy, final TimerService timerService) throws Exception { try (EventWrapper eventWrapper = new EventWrapper(event, timestamp, sharedBufferAccessor)) { return doProcess(sharedBufferAccessor, nfaState, eventWrapper, afterMatchSkipStrategy, timerService); } }
/** * Processes the next input event. If some of the computations reach a final state then the * resulting event sequences are returned. If computations time out and timeout handling is * activated, then the timed out event patterns are returned. * * <p>If computations reach a stop state, the path forward is discarded and currently constructed path is returned * with the element that resulted in the stop state. * * @param sharedBufferAccessor the accessor to SharedBuffer object that we need to work upon while processing * @param nfaState The NFAState object that we need to affect while processing * @param event The current event to be processed or null if only pruning shall be done * @param timestamp The timestamp of the current event * @param afterMatchSkipStrategy The skip strategy to use after per match * @return Tuple of the collection of matched patterns (e.g. the result of computations which have * reached a final state) and the collection of timed out patterns (if timeout handling is * activated) * @throws Exception Thrown if the system cannot access the state. */ public Collection<Map<String, List<T>>> process( final SharedBufferAccessor<T> sharedBufferAccessor, final NFAState nfaState, final T event, final long timestamp, final AfterMatchSkipStrategy afterMatchSkipStrategy) throws Exception { try (EventWrapper eventWrapper = new EventWrapper(event, timestamp, sharedBufferAccessor)) { return doProcess(sharedBufferAccessor, nfaState, eventWrapper, afterMatchSkipStrategy); } }
/** * Processes the next input event. If some of the computations reach a final state then the * resulting event sequences are returned. If computations time out and timeout handling is * activated, then the timed out event patterns are returned. * * <p>If computations reach a stop state, the path forward is discarded and currently constructed path is returned * with the element that resulted in the stop state. * * @param sharedBufferAccessor the accessor to SharedBuffer object that we need to work upon while processing * @param nfaState The NFAState object that we need to affect while processing * @param event The current event to be processed or null if only pruning shall be done * @param timestamp The timestamp of the current event * @param afterMatchSkipStrategy The skip strategy to use after per match * @return Tuple of the collection of matched patterns (e.g. the result of computations which have * reached a final state) and the collection of timed out patterns (if timeout handling is * activated) * @throws Exception Thrown if the system cannot access the state. */ public Collection<Map<String, List<T>>> process( final SharedBufferAccessor<T> sharedBufferAccessor, final NFAState nfaState, final T event, final long timestamp, final AfterMatchSkipStrategy afterMatchSkipStrategy) throws Exception { try (EventWrapper eventWrapper = new EventWrapper(event, timestamp, sharedBufferAccessor)) { return doProcess(sharedBufferAccessor, nfaState, eventWrapper, afterMatchSkipStrategy); } }