Class BlockTransferThrottler


  • public final class BlockTransferThrottler
    extends Object
    A class to restrict parallel connection per runtime edge. Executors can suffer from performance degradation and network-related exceptions when there are massive connections, especially under low network bandwidth or high volume of data.
    • Method Detail

      • requestTransferPermission

        public CompletableFuture<Void> requestTransferPermission​(String runtimeEdgeId)
        Request a permission to make a connection.
        Parameters:
        runtimeEdgeId - the corresponding runtime edge id.
        Returns:
        a future that will be completed when the connection is granted.
      • onTransferFinished

        public void onTransferFinished​(String runtimeEdgeId)
        Indicates the transfer has finished.
        Parameters:
        runtimeEdgeId - the corresponding runtime edge id.