Interface Broadcast<T>

    • Method Detail

      • withAffinity

        Broadcast<T> withAffinity​(Object affinity)
        Affinity key.

        Specifying an affinity key ensures that all operation with the same key will always be transmitted over the same network connection and will always be processed by the same thread (if the cluster topology doesn't change).

        Parameters:
        affinity - Affinity key.
        Returns:
        This instance.
      • withTimeout

        Broadcast<T> withTimeout​(long timeout,
                                 TimeUnit unit)
        Overrides the channel's default timeout value for this operation.

        If this operation can not complete at the specified timeout then this operation will end up in a MessageTimeoutException.

        Specifying a negative or zero value disables the timeout check.

        Parameters:
        timeout - Timeout.
        unit - Unit.
        Returns:
        This instance.
        See Also:
        MessagingChannelConfig.setMessagingTimeout(long)
      • withAckMode

        Broadcast<T> withAckMode​(AckMode ackMode)
        Acknowledgement mode.

        If this option is set to AckMode.REQUIRED then the receiver of this operation will send back an acknowledgement to indicate that this operation was successfully received. In such case the operation's callback/future will be notified only when such acknowledgement is received from all nodes (or if operation fails).

        If this option is set to AckMode.NOT_NEEDED then operation will be assumed to be successful once the message gets flushed to the network buffer without any additional acknowledgements from receivers.

        Default value of this option is AckMode.NOT_NEEDED.

        Parameters:
        ackMode - Acknowledgement mode.
        Returns:
        This instance.
      • submit

        BroadcastFuture<T> submit()
        Asynchronously executes this operation.
        Returns:
        Future result of this operation.
      • submit

        default void submit​(BroadcastCallback<T> callback)
        Asynchronously executes this operation and notifies the specified callback upon completion.
        Parameters:
        callback - Callback.