Class ChannelStatePersister
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.consumer.ChannelStatePersister
-
@NotThreadSafe public final class ChannelStatePersister extends Object
Helper class for persisting channel state viaChannelStateWriter.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OptionalLongcheckForBarrier(Buffer buffer)protected booleanhasBarrierReceived()protected voidmaybePersist(Buffer buffer)protected AbstractEventparseEvent(Buffer buffer)Parses the buffer as an event and returns theCheckpointBarrierif the event is indeed a barrier or returns null in all other cases.protected voidstartPersisting(long barrierId, List<Buffer> knownBuffers)protected voidstopPersisting(long id)StringtoString()
-
-
-
Method Detail
-
startPersisting
protected void startPersisting(long barrierId, List<Buffer> knownBuffers) throws CheckpointException- Throws:
CheckpointException
-
stopPersisting
protected void stopPersisting(long id)
-
maybePersist
protected void maybePersist(Buffer buffer)
-
checkForBarrier
protected OptionalLong checkForBarrier(Buffer buffer) throws IOException
- Throws:
IOException
-
parseEvent
@Nullable protected AbstractEvent parseEvent(Buffer buffer) throws IOException
Parses the buffer as an event and returns theCheckpointBarrierif the event is indeed a barrier or returns null in all other cases.- Throws:
IOException
-
hasBarrierReceived
protected boolean hasBarrierReceived()
-
-