Top Description Inners Fields Constructors Methods
rx

public final Class BackpressureOverflow

extends Object
Class Inheritance
Imports
rx.exceptions.MissingBackpressureException

Generic strategy and default implementations to deal with backpressure buffer overflows.
Since
1.3

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
BackpressureOverflow.DropLatest

Drop most recent items, but not onError nor unsubscribe from source (as {code OperatorOnBackpressureDrop}).

pack-priv static class
BackpressureOverflow.DropOldest

Drop oldest items from the buffer making room for newer ones.

pack-priv static class
BackpressureOverflow.Error

onError a MissingBackpressureException and unsubscribe from source.

public static interface
BackpressureOverflow.Strategy

Represents a callback called when a value is about to be dropped due to lack of downstream requests.

Field Summary

Modifier and TypeField and Description
public static final BackpressureOverflow.Strategy
ON_OVERFLOW_DEFAULT

By default, signal a MissingBackressureException due to lack of requests.

public static final BackpressureOverflow.Strategy
ON_OVERFLOW_DROP_LATEST

Drop the latest value.

public static final BackpressureOverflow.Strategy
ON_OVERFLOW_DROP_OLDEST

Drop the oldest value in the buffer.

public static final BackpressureOverflow.Strategy
ON_OVERFLOW_ERROR

Signal a MissingBackressureException due to lack of requests.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ON_OVERFLOW_DEFAULTback to summary
public static final BackpressureOverflow.Strategy ON_OVERFLOW_DEFAULT

By default, signal a MissingBackressureException due to lack of requests.

ON_OVERFLOW_DROP_LATESTback to summary
public static final BackpressureOverflow.Strategy ON_OVERFLOW_DROP_LATEST

Drop the latest value.

ON_OVERFLOW_DROP_OLDESTback to summary
public static final BackpressureOverflow.Strategy ON_OVERFLOW_DROP_OLDEST

Drop the oldest value in the buffer.

ON_OVERFLOW_ERRORback to summary
public static final BackpressureOverflow.Strategy ON_OVERFLOW_ERROR

Signal a MissingBackressureException due to lack of requests.

Constructor Detail

BackpressureOverflowback to summary
private BackpressureOverflow()
rx back to summary

pack-priv final Class BackpressureOverflow.DropLatest

extends Object
implements Strategy
Class Inheritance
All Implemented Interfaces
rx.BackpressureOverflow.Strategy

Drop most recent items, but not onError nor unsubscribe from source (as {code OperatorOnBackpressureDrop}).

Field Summary

Modifier and TypeField and Description
pack-priv static final BackpressureOverflow.DropLatest

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
mayAttemptDrop()

Implements rx.BackpressureOverflow.Strategy.mayAttemptDrop.

Whether the Backpressure manager should attempt to drop the oldest item, or simply drop the item currently causing backpressure.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
pack-priv static final BackpressureOverflow.DropLatest INSTANCE

Constructor Detail

DropLatestback to summary
private DropLatest()

Method Detail

mayAttemptDropback to summary
public boolean mayAttemptDrop()

Implements rx.BackpressureOverflow.Strategy.mayAttemptDrop.

Doc from rx.BackpressureOverflow.Strategy.mayAttemptDrop.

Whether the Backpressure manager should attempt to drop the oldest item, or simply drop the item currently causing backpressure.

Returns:boolean

true to request drop of the oldest item, false to drop the newest.

Annotations
@Override
rx back to summary

pack-priv final Class BackpressureOverflow.DropOldest

extends Object
implements Strategy
Class Inheritance
All Implemented Interfaces
rx.BackpressureOverflow.Strategy

Drop oldest items from the buffer making room for newer ones.

Field Summary

Modifier and TypeField and Description
pack-priv static final BackpressureOverflow.DropOldest

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
mayAttemptDrop()

Implements rx.BackpressureOverflow.Strategy.mayAttemptDrop.

Whether the Backpressure manager should attempt to drop the oldest item, or simply drop the item currently causing backpressure.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
pack-priv static final BackpressureOverflow.DropOldest INSTANCE

Constructor Detail

DropOldestback to summary
private DropOldest()

Method Detail

mayAttemptDropback to summary
public boolean mayAttemptDrop()

Implements rx.BackpressureOverflow.Strategy.mayAttemptDrop.

Doc from rx.BackpressureOverflow.Strategy.mayAttemptDrop.

Whether the Backpressure manager should attempt to drop the oldest item, or simply drop the item currently causing backpressure.

Returns:boolean

true to request drop of the oldest item, false to drop the newest.

Annotations
@Override
rx back to summary

pack-priv final Class BackpressureOverflow.Error

extends Object
implements Strategy
Class Inheritance
All Implemented Interfaces
rx.BackpressureOverflow.Strategy

onError a MissingBackpressureException and unsubscribe from source.

Field Summary

Modifier and TypeField and Description
pack-priv static final BackpressureOverflow.Error

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
mayAttemptDrop()

Implements rx.BackpressureOverflow.Strategy.mayAttemptDrop.

Whether the Backpressure manager should attempt to drop the oldest item, or simply drop the item currently causing backpressure.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
pack-priv static final BackpressureOverflow.Error INSTANCE

Constructor Detail

Errorback to summary
private Error()

Method Detail

mayAttemptDropback to summary
public boolean mayAttemptDrop() throws MissingBackpressureException

Implements rx.BackpressureOverflow.Strategy.mayAttemptDrop.

Doc from rx.BackpressureOverflow.Strategy.mayAttemptDrop.

Whether the Backpressure manager should attempt to drop the oldest item, or simply drop the item currently causing backpressure.

Returns:boolean

true to request drop of the oldest item, false to drop the newest.

Annotations
@Override
Exceptions
MissingBackpressureException:
if the strategy should signal MissingBackpressureException
rx back to summary

public Interface BackpressureOverflow.Strategy

Known Direct Implementers
rx.BackpressureOverflow.DropOldest, rx.BackpressureOverflow.DropLatest, rx.BackpressureOverflow.Error

Represents a callback called when a value is about to be dropped due to lack of downstream requests.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true to request drop of the oldest item, false to drop the newest.
mayAttemptDrop
()

Whether the Backpressure manager should attempt to drop the oldest item, or simply drop the item currently causing backpressure.

Method Detail

mayAttemptDropback to summary
public boolean mayAttemptDrop() throws MissingBackpressureException

Whether the Backpressure manager should attempt to drop the oldest item, or simply drop the item currently causing backpressure.

Returns:boolean

true to request drop of the oldest item, false to drop the newest.

Exceptions
MissingBackpressureException:
if the strategy should signal MissingBackpressureException