private Map < String , List < EventId > > extractCurrentMatches ( final SharedBufferAccessor < T > sharedBufferAccessor , final ComputationState computationState ) throws Exception { if ( computationState . getPreviousBufferEntry ( ) == null ) { return new HashMap <> ( ) ; } List < Map < String , List < EventId > > > paths = sharedBufferAccessor . extractPatterns ( computationState . getPreviousBufferEntry ( ) , computationState . getVersion ( ) ) ; if ( paths . isEmpty ( ) ) { return new HashMap <> ( ) ; } // for a given computation state, we cannot have more than one matching patterns. Preconditions . checkState ( paths . size ( ) == 1 ) ; return paths . get ( 0 ) ; }
Extracts all the sequences of events from the start to the given computation state . An event sequence is returned as a map which contains the events and the names of the states to which the events were mapped .