Record Class OnBackpressureBufferConfig<T>
java.lang.Object
java.lang.Record
io.reactivex.rxjava4.core.config.OnBackpressureBufferConfig<T>
- Type Parameters:
T- the element type of the sequences being compared- Record Components:
capacity- number of slots available in the buffer.delayError- iftrue, an exception from the currentFlowableis delayed until all buffered elements have been consumed by the downstream; iffalse, an exception is immediately signaled to the downstream, skipping any buffered elementunbounded- iftrue, the capacity value is interpreted as the internal "island" size of the unbounded bufferonDropped- theConsumerto be called with the item that could not be buffered due to capacity constraints.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OnBackpressureBufferConfig<Object> The default settings with no error delay, unbounded, no onOverflow or onDropped activity. -
Constructor Summary
ConstructorsConstructorDescriptionOnBackpressureBufferConfig(boolean delayError) Creates a config with the given error delay mode, capacity ofFlowable.bufferSize(), bounded, and no callback.OnBackpressureBufferConfig(boolean delayError, boolean unbounded) Creates a config with the given error delay mode, given boundedneess, capacity ofFlowable.bufferSize()and no callback.OnBackpressureBufferConfig(int capacity) Creates a config with the given capacity, no error delay, bounded, no callbacks.OnBackpressureBufferConfig(int capacity, boolean delayError) Creates a config with the given capacity, given error delay mode, bounded, and no callback.OnBackpressureBufferConfig(int capacity, boolean delayError, boolean unbounded) Creates a config with the given capacity, error delay mode and unboundedness, and no callback.OnBackpressureBufferConfig(int capacity, boolean delayError, boolean unbounded, @NonNull Consumer<? super T> onDropped) Creates a config with all the provided values.OnBackpressureBufferConfig(int capacity, @NonNull Consumer<? super T> onDropped) Creates a config with the given capacity, given onDropped callback no error delay, bounded, and no callback.OnBackpressureBufferConfig(@NonNull Consumer<? super T> onDropped) Creates a config with the given onDropped callback, capacity ofFlowable.bufferSize(), no error delay, bounded, and no callback. -
Method Summary
Modifier and TypeMethodDescriptionintcapacity()Returns the value of thecapacityrecord component.booleanReturns the value of thedelayErrorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theonDroppedrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theunboundedrecord component.
-
Field Details
-
DEFAULT
The default settings with no error delay, unbounded, no onOverflow or onDropped activity.
-
-
Constructor Details
-
OnBackpressureBufferConfig
public OnBackpressureBufferConfig(int capacity) Creates a config with the given capacity, no error delay, bounded, no callbacks.- Parameters:
capacity- number of slots available in the buffer.
-
OnBackpressureBufferConfig
public OnBackpressureBufferConfig(boolean delayError) Creates a config with the given error delay mode, capacity ofFlowable.bufferSize(), bounded, and no callback.- Parameters:
delayError- iftrue, an exception from the currentFlowableis delayed until all buffered elements have been consumed by the downstream; iffalse, an exception is immediately signaled to the downstream, skipping any buffered element
-
OnBackpressureBufferConfig
public OnBackpressureBufferConfig(int capacity, boolean delayError) Creates a config with the given capacity, given error delay mode, bounded, and no callback.- Parameters:
capacity- number of slots available in the buffer.delayError- iftrue, an exception from the currentFlowableis delayed until all buffered elements have been consumed by the downstream; iffalse, an exception is immediately signaled to the downstream, skipping any buffered element
-
OnBackpressureBufferConfig
public OnBackpressureBufferConfig(boolean delayError, boolean unbounded) Creates a config with the given error delay mode, given boundedneess, capacity ofFlowable.bufferSize()and no callback.- Parameters:
delayError- iftrue, an exception from the currentFlowableis delayed until all buffered elements have been consumed by the downstream; iffalse, an exception is immediately signaled to the downstream, skipping any buffered elementunbounded- iftrue, the capacity value is interpreted as the internal "island" size of the unbounded buffer
-
OnBackpressureBufferConfig
public OnBackpressureBufferConfig(int capacity, boolean delayError, boolean unbounded) Creates a config with the given capacity, error delay mode and unboundedness, and no callback.- Parameters:
capacity- number of slots available in the buffer.delayError- iftrue, an exception from the currentFlowableis delayed until all buffered elements have been consumed by the downstream; iffalse, an exception is immediately signaled to the downstream, skipping any buffered elementunbounded- iftrue, the capacity value is interpreted as the internal "island" size of the unbounded buffer
-
OnBackpressureBufferConfig
Creates a config with the given onDropped callback, capacity ofFlowable.bufferSize(), no error delay, bounded, and no callback.- Parameters:
onDropped- theConsumerto be called with the item that could not be buffered due to capacity constraints.
-
OnBackpressureBufferConfig
Creates a config with the given capacity, given onDropped callback no error delay, bounded, and no callback.- Parameters:
capacity- number of slots available in the buffer.onDropped- theConsumerto be called with the item that could not be buffered due to capacity constraints.
-
OnBackpressureBufferConfig
public OnBackpressureBufferConfig(int capacity, boolean delayError, boolean unbounded, @NonNull @NonNull Consumer<? super T> onDropped) Creates a config with all the provided values.- Parameters:
capacity- number of slots available in the buffer.delayError- iftrue, an exception from the currentFlowableis delayed until all buffered elements have been consumed by the downstream; iffalse, an exception is immediately signaled to the downstream, skipping any buffered elementunbounded- iftrue, the capacity value is interpreted as the internal "island" size of the unbounded bufferonDropped- theConsumerto be called with the item that could not be buffered due to capacity constraints.
-
-
Method Details
-
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. -
capacity
-
delayError
public boolean delayError()Returns the value of thedelayErrorrecord component.- Returns:
- the value of the
delayErrorrecord component
-
unbounded
-
onDropped
-