Map<String, List<T>> timedOutPattern = sharedBufferAccessor.materializeMatch(extractCurrentMatches( sharedBufferAccessor, computationState));
sharedBufferAccessor); result.add(sharedBufferAccessor.materializeMatch(matchedResult.get(0))); sharedBufferAccessor.releaseNode(earliestMatch.getPreviousBufferEntry()); earliestMatch = nfaState.getCompletedMatches().peek();
for (ComputationState match : potentialMatches) { Map<String, List<T>> materializedMatch = sharedBufferAccessor.materializeMatch( sharedBufferAccessor.extractPatterns( match.getPreviousBufferEntry(),
NodeId c = sharedBufferAccessor.put("c", eventIds[4], bb, DeweyNumber.fromString("1.0.0.0.0")); Map<String, List<Event>> patternsResult = sharedBufferAccessor.materializeMatch(sharedBufferAccessor.extractPatterns(c, DeweyNumber.fromString("1.0.0.0.0")).get(0));
DeweyNumber.fromString("1.1.0")); assertEquals(1L, patterns3.size()); assertEquals(expectedPattern3, sharedBufferAccessor.materializeMatch(patterns3.get(0))); sharedBufferAccessor.releaseNode(b3); DeweyNumber.fromString("2.0.0")); assertEquals(1L, patterns1.size()); assertEquals(expectedPattern1, sharedBufferAccessor.materializeMatch(patterns1.get(0))); assertEquals(expectedPattern2, sharedBufferAccessor.materializeMatch(patterns2.get(0))); sharedBufferAccessor.releaseNode(b1); sharedBufferAccessor.releaseNode(b0);
@Override public Iterable<T> getEventsForPattern(final String key) throws Exception { Preconditions.checkNotNull(key); // the (partially) matched pattern is computed lazily when this method is called. // this is to avoid any overheads when using a simple, non-iterative condition. if (matchedEvents == null) { this.matchedEvents = sharedBufferAccessor.materializeMatch(nfa.extractCurrentMatches(sharedBufferAccessor, computationState)); } return new Iterable<T>() { @Override public Iterator<T> iterator() { List<T> elements = matchedEvents.get(key); return elements == null ? Collections.EMPTY_LIST.<T>iterator() : elements.iterator(); } }; } }
@Override public Iterable<T> getEventsForPattern(final String key) throws Exception { Preconditions.checkNotNull(key); // the (partially) matched pattern is computed lazily when this method is called. // this is to avoid any overheads when using a simple, non-iterative condition. if (matchedEvents == null) { this.matchedEvents = sharedBufferAccessor.materializeMatch(nfa.extractCurrentMatches(sharedBufferAccessor, computationState)); } return new Iterable<T>() { @Override public Iterator<T> iterator() { List<T> elements = matchedEvents.get(key); return elements == null ? Collections.EMPTY_LIST.<T>iterator() : elements.iterator(); } }; } }
Map<String, List<T>> timedOutPattern = sharedBufferAccessor.materializeMatch(extractCurrentMatches( sharedBufferAccessor, computationState));
Map<String, List<T>> timedOutPattern = sharedBufferAccessor.materializeMatch(extractCurrentMatches( sharedBufferAccessor, computationState));
sharedBufferAccessor); result.add(sharedBufferAccessor.materializeMatch(matchedResult.get(0))); sharedBufferAccessor.releaseNode(earliestMatch.getPreviousBufferEntry()); earliestMatch = nfaState.getCompletedMatches().peek();
sharedBufferAccessor); result.add(sharedBufferAccessor.materializeMatch(matchedResult.get(0))); sharedBufferAccessor.releaseNode(earliestMatch.getPreviousBufferEntry()); earliestMatch = nfaState.getCompletedMatches().peek();
for (ComputationState match : potentialMatches) { Map<String, List<T>> materializedMatch = sharedBufferAccessor.materializeMatch( sharedBufferAccessor.extractPatterns( match.getPreviousBufferEntry(),
for (ComputationState match : potentialMatches) { Map<String, List<T>> materializedMatch = sharedBufferAccessor.materializeMatch( sharedBufferAccessor.extractPatterns( match.getPreviousBufferEntry(),