private boolean isStateTimedOut(final ComputationState state, final long timestamp) { return !isStartState(state) && windowTime > 0L && timestamp - state.getStartTimestamp() >= windowTime; }
sharedBufferAccessor, computationState)); timeoutResult.add(Tuple2.of(timedOutPattern, computationState.getStartTimestamp() + windowTime));
private void serializeSingleComputationState( ComputationState computationState, DataOutputView target) throws IOException { StringValue.writeString(computationState.getCurrentStateName(), target); nodeIdSerializer.serialize(computationState.getPreviousBufferEntry(), target); versionSerializer.serialize(computationState.getVersion(), target); target.writeLong(computationState.getStartTimestamp()); serializeStartEvent(computationState.getStartEventID(), target); }
computationState.getPreviousBufferEntry(), version, computationState.getStartTimestamp(), computationState.getStartEventID() ); startEventId = event.getEventId(); } else { startTimestamp = computationState.getStartTimestamp(); startEventId = computationState.getStartEventID();
private boolean isStateTimedOut(final ComputationState state, final long timestamp) { return !isStartState(state) && windowTime > 0L && timestamp - state.getStartTimestamp() >= windowTime; }
private boolean isStateTimedOut(final ComputationState state, final long timestamp) { return !isStartState(state) && windowTime > 0L && timestamp - state.getStartTimestamp() >= windowTime; }
readState.getTimestamp(), readState.getVersion(), readState.getStartTimestamp() ));
private void serializeComputationStates(Queue<ComputationState> states, DataOutputView target) throws IOException { target.writeInt(states.size()); for (ComputationState computationState : states) { STATE_NAME_SERIALIZER.serialize(computationState.getCurrentStateName(), target); NODE_ID_SERIALIZER.serialize(computationState.getPreviousBufferEntry(), target); VERSION_SERIALIZER.serialize(computationState.getVersion(), target); TIMESTAMP_SERIALIZER.serialize(computationState.getStartTimestamp(), target); if (computationState.getStartEventID() != null) { target.writeByte(1); EVENT_ID_SERIALIZER.serialize(computationState.getStartEventID(), target); } else { target.writeByte(0); } } }
private void serializeComputationStates(Queue<ComputationState> states, DataOutputView target) throws IOException { target.writeInt(states.size()); for (ComputationState computationState : states) { STATE_NAME_SERIALIZER.serialize(computationState.getCurrentStateName(), target); NODE_ID_SERIALIZER.serialize(computationState.getPreviousBufferEntry(), target); VERSION_SERIALIZER.serialize(computationState.getVersion(), target); TIMESTAMP_SERIALIZER.serialize(computationState.getStartTimestamp(), target); if (computationState.getStartEventID() != null) { target.writeByte(1); EVENT_ID_SERIALIZER.serialize(computationState.getStartEventID(), target); } else { target.writeByte(0); } } }
timestamp - computationState.getStartTimestamp() >= windowTime) {
@Override public void serialize(NFA<T> record, DataOutputView target) throws IOException { serializeStates(record.states, target); target.writeLong(record.windowTime); target.writeBoolean(record.handleTimeout); sharedBufferSerializer.serialize(record.eventSharedBuffer, target); target.writeInt(record.computationStates.size()); StringSerializer stateNameSerializer = StringSerializer.INSTANCE; LongSerializer timestampSerializer = LongSerializer.INSTANCE; DeweyNumber.DeweyNumberSerializer versionSerializer = new DeweyNumber.DeweyNumberSerializer(); for (ComputationState<T> computationState: record.computationStates) { stateNameSerializer.serialize(computationState.getState().getName(), target); stateNameSerializer.serialize(computationState.getPreviousState() == null ? null : computationState.getPreviousState().getName(), target); timestampSerializer.serialize(computationState.getTimestamp(), target); versionSerializer.serialize(computationState.getVersion(), target); timestampSerializer.serialize(computationState.getStartTimestamp(), target); target.writeInt(computationState.getCounter()); if (computationState.getEvent() == null) { target.writeBoolean(false); } else { target.writeBoolean(true); eventSerializer.serialize(computationState.getEvent(), target); } } }
computationState.getPreviousBufferEntry(), version, computationState.getStartTimestamp(), computationState.getStartEventID() ); startEventId = event.getEventId(); } else { startTimestamp = computationState.getStartTimestamp(); startEventId = computationState.getStartEventID();
computationState.getPreviousBufferEntry(), version, computationState.getStartTimestamp(), computationState.getStartEventID() ); startEventId = event.getEventId(); } else { startTimestamp = computationState.getStartTimestamp(); startEventId = computationState.getStartEventID();
computationState.getTimestamp(), version, computationState.getStartTimestamp() ); currentVersion); } else { startTimestamp = computationState.getStartTimestamp(); counter = eventSharedBuffer.put( NFAStateNameHandler.getOriginalNameFromInternal(