Interface SendingMailbox

    • Method Detail

      • complete

        void complete()
        Called when there is no more data to be sent by the BlockExchange. This is also a signal for the SendingMailbox that the sender is done sending data from its end. Note that this doesn't mean that the receiver has received all the data.

        Note: While this is similar to a close() method that's usually provided with objects that hold releasable resources, the key difference is that a SendingMailbox cannot completely release the resources on its end gracefully, since it would be waiting for the receiver to ack that it has received all the data. See cancel(java.lang.Throwable) which can allow callers to force release the underlying resources.

      • cancel

        void cancel​(Throwable t)
        Cancels the mailbox and notifies the receiver of the cancellation so that it can release the underlying resources. No more blocks can be sent after calling this method.
      • isTerminated

        boolean isTerminated()
        Returns whether the ReceivingMailbox is already closed. There is no need to send more blocks after the mailbox is terminated.