trait Transaction extends AutoCloseable

This trait represents a shuffle "transaction", and it is specific to a transfer (or set of transfers).

It is useful in that it groups a set of sends and receives requires in order to carry an action against a peer. It can be used to find statistics about the transfer (bytes send/received, throughput), and it also can be waited on, for blocking clients.

NOTE: a Transaction is thread safe w.r.t. a connection's callback. Calling methods on the transaction outside of waitForCompletion produces undefined behavior.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Transaction
  2. AutoCloseable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def close(): Unit
    Definition Classes
    AutoCloseable
    Annotations
    @throws( classOf[java.lang.Exception] )
  2. abstract def getErrorMessage: Option[String]

    Get error messages that could have occurred during the transaction.

    Get error messages that could have occurred during the transaction.

    returns

    returns an optional error message

  3. abstract def getHeader: Long

    Return this transaction's header, for debug purposes

  4. abstract def getStats: TransactionStats

    Get the statistics object (bytes sent/recv, tx time, and throughput are available)

  5. abstract def getStatus: TransactionStatus.Value

    Get the status this transaction is in.

    Get the status this transaction is in. Callbacks use this to handle various transaction states (e.g. success, error, etc.)

  6. abstract def peerExecutorId(): Long

    Get the peer executor id if available

    Get the peer executor id if available

    Note

    this can throw if the Transaction was not created due to an Active Message

  7. abstract def releaseMessage(): MetadataTransportBuffer

    Hands over a message (a host-side request or response at the moment) that is held in the Transaction

    Hands over a message (a host-side request or response at the moment) that is held in the Transaction

    returns

    a TransportBuffer instance

    Note

    The caller must call close on the returned message

  8. abstract def respond(response: ByteBuffer, cb: TransactionCallback): Transaction

    For Request transactions, respond will be able to reply to a peer who issued the request

    For Request transactions, respond will be able to reply to a peer who issued the request

    response

    a direct ByteBuffer

    cb

    triggered when the response succeds/fails

    returns

    a Transaction object that can be used to wait for this response to complete

    Note

    this is only available for server-side transactions, and will throw if attempted from a client

  9. abstract def waitForCompletion(): Unit

    Block until this transaction is completed.

    Block until this transaction is completed.

    NOTE: not only does this include the transaction time, but it also includes the code performed in the callback. If the callback would block, you could end up in a situation of deadlock.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped