Class ByteTransfer


  • @ThreadSafe
    public final class ByteTransfer
    extends Object
    Manages channels and exposes interface for BlockManagerWorker.
    • Method Detail

      • newInputContext

        public CompletableFuture<ByteInputContext> newInputContext​(String executorId,
                                                                   byte[] contextDescriptor,
                                                                   boolean isPipe)
        Initiate a transfer context to receive data.
        Parameters:
        executorId - the id of the remote executor
        contextDescriptor - user-provided descriptor for the new context
        isPipe - is pipe
        Returns:
        a ByteInputContext from which the received data can be read
      • newOutputContext

        public CompletableFuture<ByteOutputContext> newOutputContext​(String executorId,
                                                                     byte[] contextDescriptor,
                                                                     boolean isPipe)
        Initiate a transfer context to send data.
        Parameters:
        executorId - the id of the remote executor
        contextDescriptor - user-provided descriptor for the new context
        isPipe - is pipe
        Returns:
        a ByteOutputContext to which data can be written