Class MessageAssembler.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • fileBackedStreamFactory

        public MessageAssembler.Builder fileBackedStreamFactory​(FileBackedOutputStreamFactory newFileBackedStreamFactory)
        Sets the factory for creating FileBackedOutputStream instances used for streaming messages.
        Parameters:
        newFileBackedStreamFactory - the factory for creating FileBackedOutputStream instances
        Returns:
        this Builder
      • assembledMessageCallback

        public MessageAssembler.Builder assembledMessageCallback​(BiConsumer<Object,​ActorRef> newAssembledMessageCallback)
        Sets the Consumer callback for assembled messages. The callback takes the assembled message and the original sender ActorRef as arguments.
        Parameters:
        newAssembledMessageCallback - the Consumer callback
        Returns:
        this Builder
      • expireStateAfterInactivity

        public MessageAssembler.Builder expireStateAfterInactivity​(long duration,
                                                                   TimeUnit unit)
        Sets the duration and time unit whereby assembled message state is purged from the cache due to inactivity from the slicing component on the other end. By default, state is purged after 1 minute of inactivity.
        Parameters:
        duration - the length of time after which a state entry is purged
        unit - the unit the duration is expressed in
        Returns:
        this Builder
      • logContext

        public MessageAssembler.Builder logContext​(String newLogContext)
        Sets the context for log messages.
        Parameters:
        newLogContext - the log context
        Returns:
        this Builder
      • build

        public MessageAssembler build()
        Builds a new MessageAssembler instance.
        Returns:
        a new MessageAssembler