- java.lang.Object
-
- mutiny.zero.TubeConfiguration
-
public final class TubeConfiguration extends java.lang.Object
Configuration object for creatingTube
throughZeroPublisher.create(TubeConfiguration, Consumer)
.
-
-
Constructor Summary
Constructors Constructor Description TubeConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BackpressureStrategy
getBackpressureStrategy()
Get the back-pressure strategy.int
getBufferSize()
Get the buffer size.TubeConfiguration
withBackpressureStrategy(BackpressureStrategy strategy)
Specify the back-pressure strategy, cannot benull
.TubeConfiguration
withBufferSize(int bufferSize)
Specify the buffer size must be strictly positive whenbackpressureStrategy
is one ofBackpressureStrategy.BUFFER
andBackpressureStrategy.LATEST
.
-
-
-
Method Detail
-
withBackpressureStrategy
public TubeConfiguration withBackpressureStrategy(BackpressureStrategy strategy)
Specify the back-pressure strategy, cannot benull
. The default isBackpressureStrategy.DROP
.- Parameters:
strategy
- the back-pressure strategy- Returns:
- this configuration
-
withBufferSize
public TubeConfiguration withBufferSize(int bufferSize)
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
public BackpressureStrategy getBackpressureStrategy()
Get the back-pressure strategy.- Returns:
- the back-pressure strategy
-
getBufferSize
public int getBufferSize()
Get the buffer size.- Returns:
- the buffer size
-
-