@Internal public interface CheckpointBarrierHandler
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Cleans up all internally held resources.
|
BufferOrEvent |
getNextNonBlocked()
Returns the next
BufferOrEvent that the operator may consume. |
boolean |
isEmpty()
Checks if the barrier handler has buffered any data internally.
|
void |
registerCheckpointEventHandler(EventListener<CheckpointBarrier> checkpointHandler)
Registers the given event handler to be notified on successful checkpoints.
|
BufferOrEvent getNextNonBlocked() throws IOException, InterruptedException
BufferOrEvent
that the operator may consume.
This call blocks until the next BufferOrEvent is available, ir until the stream
has been determined to be finished.null
, if the stream is finished.IOException
- Thrown, if the network or local disk I/O fails.InterruptedException
- Thrown, if the thread is interrupted while blocking during
waiting for the next BufferOrEvent to become available.void registerCheckpointEventHandler(EventListener<CheckpointBarrier> checkpointHandler)
checkpointHandler
- The handler to register.void cleanup() throws IOException
IOException
- Thrown, if the cleanup of I/O resources failed.boolean isEmpty()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.