@Override public MigratedNFA<T> deserialize(DataInputView source) throws IOException { MigrationUtils.skipSerializedStates(source); source.readLong(); source.readBoolean(); org.apache.flink.cep.nfa.SharedBuffer<T> sharedBuffer = sharedBufferSerializer.deserialize(source); Queue<ComputationState> computationStates = deserializeComputationStates(sharedBuffer, eventSerializer, source); return new MigratedNFA<>(computationStates, sharedBuffer); }
@Override public void process(Object key, ValueState<MigratedNFA<IN>> state) throws Exception { MigratedNFA<IN> oldState = state.value(); computationStates.update(new NFAState(oldState.getComputationStates())); org.apache.flink.cep.nfa.SharedBuffer<IN> sharedBuffer = oldState.getSharedBuffer(); partialMatches.init(sharedBuffer.getEventsBuffer(), sharedBuffer.getPages()); state.clear(); } }
@Override public void process(Object key, ValueState<MigratedNFA<IN>> state) throws Exception { MigratedNFA<IN> oldState = state.value(); computationStates.update(new NFAState(oldState.getComputationStates())); org.apache.flink.cep.nfa.SharedBuffer<IN> sharedBuffer = oldState.getSharedBuffer(); partialMatches.init(sharedBuffer.getEventsBuffer(), sharedBuffer.getPages()); state.clear(); } }
@Override public MigratedNFA<T> deserialize(DataInputView source) throws IOException { MigrationUtils.skipSerializedStates(source); source.readLong(); source.readBoolean(); org.apache.flink.cep.nfa.SharedBuffer<T> sharedBuffer = sharedBufferSerializer.deserialize(source); Queue<ComputationState> computationStates = deserializeComputationStates(sharedBuffer, eventSerializer, source); return new MigratedNFA<>(computationStates, sharedBuffer); }
@Override public MigratedNFA<T> deserialize(DataInputView source) throws IOException { MigrationUtils.skipSerializedStates(source); source.readLong(); source.readBoolean(); org.apache.flink.cep.nfa.SharedBuffer<T> sharedBuffer = sharedBufferSerializer.deserialize(source); Queue<ComputationState> computationStates = deserializeComputationStates(sharedBuffer, eventSerializer, source); return new MigratedNFA<>(computationStates, sharedBuffer); }
@Override public void process(Object key, ValueState<MigratedNFA<IN>> state) throws Exception { MigratedNFA<IN> oldState = state.value(); computationStates.update(new NFAState(oldState.getComputationStates())); org.apache.flink.cep.nfa.SharedBuffer<IN> sharedBuffer = oldState.getSharedBuffer(); partialMatches.init(sharedBuffer.getEventsBuffer(), sharedBuffer.getPages()); state.clear(); } }