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 OptionalLong
checkForBarrier(Buffer buffer)
protected boolean
hasBarrierReceived()
protected void
maybePersist(Buffer buffer)
protected AbstractEvent
parseEvent(Buffer buffer)
Parses the buffer as an event and returns theCheckpointBarrier
if the event is indeed a barrier or returns null in all other cases.protected void
startPersisting(long barrierId, List<Buffer> knownBuffers)
protected void
stopPersisting(long id)
String
toString()
-
-
-
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 theCheckpointBarrier
if the event is indeed a barrier or returns null in all other cases.- Throws:
IOException
-
hasBarrierReceived
protected boolean hasBarrierReceived()
-
-