Record Class StandardBufferedConfig
java.lang.Object
java.lang.Record
io.reactivex.rxjava4.core.config.StandardBufferedConfig
- Record Components:
errorMode- how to handle when errors appear from the inner or outer sourcesbufferSize- the expected number of items to buffer or prefetch from the various sources
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StandardBufferedConfigThe default configuration with no error delays and bufferSize ofObservable.bufferSize().static final StandardBufferedConfigThe default configuration with error delays till the end and bufferSize ofObservable.bufferSize().static final StandardBufferedConfigThe default configuration with error delays till the boundary and bufferSize ofObservable.bufferSize().static final StandardBufferedConfigThe default config with no error delay and 2 as the maximum buffer size / prefetch amount setting.static final StandardBufferedConfigThe default config with error delay and 2 as the maximum buffer size / prefetch amount setting.static final StandardBufferedConfigThe default config with error delay till the boundary and 2 as the maximum buffer size / prefetch amount setting. -
Constructor Summary
ConstructorsConstructorDescriptionStandardBufferedConfig(boolean delayErrors) Sets the error mode to IMMEDIATE (false) or END (true) and the bufferSize toFlowable.bufferSize().StandardBufferedConfig(boolean delayErrors, int bufferSize) Sets the error mode to IMMEDIATE (false) or END (true) and the bufferSize to the provided value.StandardBufferedConfig(int bufferSize) Sets the error mode to IMMEDIATE and the bufferSize to the provided value.StandardBufferedConfig(@NonNull ErrorMode errorMode) Sets the error mode to the provided value and the bufferSize toFlowable.bufferSize()StandardBufferedConfig(@NonNull ErrorMode errorMode, int bufferSize) Sets the error mode and the bufferSize to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebufferSizerecord component.booleanReturns true if this config is set to a delayed error handling mode, such as BOUNDARY or ENDfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorModerecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
The default configuration with no error delays and bufferSize ofObservable.bufferSize(). -
DELAY_ERRORS
The default configuration with error delays till the end and bufferSize ofObservable.bufferSize(). -
DELAY_ERRORS_BOUNDARY
The default configuration with error delays till the boundary and bufferSize ofObservable.bufferSize(). -
MIN_DEFAULT
The default config with no error delay and 2 as the maximum buffer size / prefetch amount setting. -
MIN_DELAY_ERRORS
The default config with error delay and 2 as the maximum buffer size / prefetch amount setting. -
MIN_DELAY_ERRORS_BOUNDARY
The default config with error delay till the boundary and 2 as the maximum buffer size / prefetch amount setting.
-
-
Constructor Details
-
StandardBufferedConfig
Sets the error mode to the provided value and the bufferSize toFlowable.bufferSize()- Parameters:
errorMode- how to handle when errors appear from the inner or outer sources
-
StandardBufferedConfig
public StandardBufferedConfig(boolean delayErrors) Sets the error mode to IMMEDIATE (false) or END (true) and the bufferSize toFlowable.bufferSize().- Parameters:
delayErrors- if true, ErrorMode.END is used, ErrorMode.IMMEDIATE otherwise
-
StandardBufferedConfig
public StandardBufferedConfig(int bufferSize) Sets the error mode to IMMEDIATE and the bufferSize to the provided value.- Parameters:
bufferSize- the expected number of outer sources to buffer while processing an inner source
-
StandardBufferedConfig
public StandardBufferedConfig(boolean delayErrors, int bufferSize) Sets the error mode to IMMEDIATE (false) or END (true) and the bufferSize to the provided value.- Parameters:
delayErrors- if true, ErrorMode.END is used, ErrorMode.IMMEDIATE otherwisebufferSize- the expected number of outer sources to buffer while processing an inner source
-
StandardBufferedConfig
Sets the error mode and the bufferSize to the provided values.- Parameters:
errorMode- how to handle when errors appear from the inner or outer sourcesbufferSize- the expected number of outer sources to buffer while processing an inner source
-
-
Method Details
-
delayErrors
public boolean delayErrors()Returns true if this config is set to a delayed error handling mode, such as BOUNDARY or END- Returns:
- true if this config is set to a delayed error handling mode,
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
errorMode
-
bufferSize
public int bufferSize()Returns the value of thebufferSizerecord component.- Returns:
- the value of the
bufferSizerecord component
-