java.lang.Object
mutiny.zero.TubeConfiguration
Configuration object for creating
Tube
through ZeroPublisher.create(TubeConfiguration, Consumer)
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the back-pressure strategy.int
Get the buffer size.withBackpressureStrategy
(BackpressureStrategy strategy) Specify the back-pressure strategy, cannot benull
.withBufferSize
(int bufferSize) Specify the buffer size must be strictly positive whenbackpressureStrategy
is one ofBackpressureStrategy.BUFFER
andBackpressureStrategy.LATEST
.
-
Constructor Details
-
TubeConfiguration
public TubeConfiguration()
-
-
Method Details
-
withBackpressureStrategy
Specify the back-pressure strategy, cannot benull
. The default isBackpressureStrategy.DROP
.- Parameters:
strategy
- the back-pressure strategy- Returns:
- this configuration
-
withBufferSize
Specify the buffer size must be strictly positive whenbackpressureStrategy
is one ofBackpressureStrategy.BUFFER
andBackpressureStrategy.LATEST
. The default is-1
.- Parameters:
bufferSize
- the buffer size- Returns:
- this configuration
-
getBackpressureStrategy
Get the back-pressure strategy.- Returns:
- the back-pressure strategy
-
getBufferSize
public int getBufferSize()Get the buffer size.- Returns:
- the buffer size
-