Class SliceOptions.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • identifier

        public SliceOptions.Builder identifier​(Identifier newIdentifier)
        Sets the identifier of the component to slice.
        Parameters:
        newIdentifier - the identifier
        Returns:
        this Builder
      • message

        public <T extends SerializableSliceOptions.Builder message​(T newMessage)
        Sets the message to slice. The message is first serialized to a FileBackedOutputStream. If the message doesn't need to be sliced, ie its serialized size is less than the maximum message slice size, then the original message is sent. Otherwise the first message slice is sent.

        Note: a FileBackedOutputStreamFactory must be set in the MessageSlicer.

        Type Parameters:
        T - the Serializable message type
        Parameters:
        newMessage - the message
        Returns:
        this Builder
      • sendTo

        public SliceOptions.Builder sendTo​(ActorRef sendTo)
        Sets the reference of the actor to which to send the message slices.
        Parameters:
        sendTo - the ActorRef
        Returns:
        this Builder
      • sendTo

        public SliceOptions.Builder sendTo​(ActorSelection sendTo)
        Sets the ActorSelection to which to send the message slices.
        Parameters:
        sendTo - the ActorSelection
        Returns:
        this Builder
      • onFailureCallback

        public SliceOptions.Builder onFailureCallback​(Consumer<Throwable> newOnFailureCallback)
        Sets the callback to be notified of failure.
        Parameters:
        newOnFailureCallback - the callback
        Returns:
        this Builder
      • build

        public SliceOptions build()
        Builds a new SliceOptions instance.
        Returns:
        a new SliceOptions
      • checkSealed

        protected void checkSealed()