Class ByteTransfer


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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletableFuture<ByteInputContext> newInputContext​(java.lang.String executorId, byte[] contextDescriptor, boolean isPipe)
      Initiate a transfer context to receive data.
      java.util.concurrent.CompletableFuture<ByteOutputContext> newOutputContext​(java.lang.String executorId, byte[] contextDescriptor, boolean isPipe)
      Initiate a transfer context to send data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • newInputContext

        public java.util.concurrent.CompletableFuture<ByteInputContext> newInputContext​(java.lang.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 java.util.concurrent.CompletableFuture<ByteOutputContext> newOutputContext​(java.lang.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