@Override public void serialize(NFAState record, DataOutputView target) throws IOException { serializeComputationStates(record.getPartialMatches(), target); serializeComputationStates(record.getCompletedMatches(), target); }
final PriorityQueue<ComputationState> newPartialMatches = new PriorityQueue<>(NFAState.COMPUTATION_STATE_COMPARATOR); for (ComputationState computationState : nfaState.getPartialMatches()) { if (isStateTimedOut(computationState, timestamp)) {
nfaState.getPartialMatches().removeIf(pm -> pm.getStartEventID() != null && !partialMatches.contains(pm));
)); assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
)); assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
Lists.newArrayList(a1, b1, c1, d) )); assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("a", nfaState.getPartialMatches().peek().getCurrentStateName());
Lists.newArrayList(startEvent, middleEvent1, breaking) )); assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
)); assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
Lists.newArrayList(a1, d1) )); assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("a", nfaState.getPartialMatches().peek().getCurrentStateName());
Lists.newArrayList(startEvent, middleEvent1, breaking) )); assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
)); assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
Lists.newArrayList(startEvent, breaking) )); assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
Lists.newArrayList(startEvent, middleEvent1, breaking) )); assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
Lists.newArrayList(startEvent, breaking) )); assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
)); assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
Lists.newArrayList(startEvent, breaking) )); assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());
assertEquals(1, nfaState.getPartialMatches().size()); assertEquals("start", nfaState.getPartialMatches().peek().getCurrentStateName());