public static class MessageSlicer.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
MessageSlicer |
build()
Builds a new MessageSlicer instance.
|
MessageSlicer.Builder |
expireStateAfterInactivity(long duration,
TimeUnit unit)
Sets the duration and time unit whereby sliced message state is purged from the cache and the associated
failure callback is notified due to inactivity from the assembling component on the other end.
|
MessageSlicer.Builder |
fileBackedStreamFactory(FileBackedOutputStreamFactory newFileBackedStreamFactory)
Sets the factory for creating FileBackedOutputStream instances used for streaming messages.
|
MessageSlicer.Builder |
logContext(String newLogContext)
Sets the context for log messages.
|
MessageSlicer.Builder |
maxSlicingTries(int newMaxSlicingTries)
Sets the maximum number of tries for slicing a message.
|
MessageSlicer.Builder |
messageSliceSize(int newMessageSliceSize)
Sets the maximum size (in bytes) for a message slice.
|
public MessageSlicer.Builder fileBackedStreamFactory(FileBackedOutputStreamFactory newFileBackedStreamFactory)
MessageSlicer.slice(SliceOptions)
method if a Serializable message is passed.
If Serializable messages aren't passed then the factory need not be set.newFileBackedStreamFactory
- the factory for creating FileBackedOutputStream instancespublic MessageSlicer.Builder messageSliceSize(int newMessageSliceSize)
newMessageSliceSize
- the maximum size (in bytes)public MessageSlicer.Builder maxSlicingTries(int newMaxSlicingTries)
MessageSlicer.DEFAULT_MAX_SLICING_TRIES
newMaxSlicingTries
- the maximum number of triespublic MessageSlicer.Builder expireStateAfterInactivity(long duration, TimeUnit unit)
duration
- the length of time after which a state entry is purgedunit
- the unit the duration is expressed inpublic MessageSlicer.Builder logContext(String newLogContext)
newLogContext
- the log contextpublic MessageSlicer build()
Copyright © 2019 OpenDaylight. All rights reserved.