Class SimpleSplitAssigner

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, SplitAssigner

    @Internal
    public class SimpleSplitAssigner
    extends java.lang.Object
    implements SplitAssigner
    Since all methods are called in the source coordinator thread by enumerator, there is no need for locking.
    • Constructor Detail

      • SimpleSplitAssigner

        public SimpleSplitAssigner()
    • Method Detail

      • isAvailable

        public java.util.concurrent.CompletableFuture<java.lang.Void> isAvailable()
        Description copied from interface: SplitAssigner
        Enumerator can get a notification via CompletableFuture when the assigner has more splits available later. Enumerator should schedule assignment in the thenAccept action of the future.

        Assigner will return the same future if this method is called again before the previous future is completed.

        The future can be completed from other thread, e.g. the coordinator thread from another thread for event time alignment.

        If enumerator need to trigger action upon the future completion, it may want to run it in the coordinator thread using SplitEnumeratorContext.runInCoordinatorThread(Runnable).

        Specified by:
        isAvailable in interface SplitAssigner