Package rx.internal.operators
Enum Class OnSubscribeDetach.TerminatedProducer
java.lang.Object
java.lang.Enum<OnSubscribeDetach.TerminatedProducer>
rx.internal.operators.OnSubscribeDetach.TerminatedProducer
- All Implemented Interfaces:
Serializable
,Comparable<OnSubscribeDetach.TerminatedProducer>
,Constable
,Producer
- Enclosing class:
OnSubscribeDetach<T>
static enum OnSubscribeDetach.TerminatedProducer
extends Enum<OnSubscribeDetach.TerminatedProducer>
implements Producer
Singleton instance via enum.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
request
(long n) Request a certain maximum number of items from this Producer.Returns the enum constant of this class with the specified name.static OnSubscribeDetach.TerminatedProducer[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Constructor Details
-
TerminatedProducer
private TerminatedProducer()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
request
public void request(long n) Description copied from interface:Producer
Request a certain maximum number of items from this Producer. This is a way of requesting backpressure. To disable backpressure, passLong.MAX_VALUE
to this method.Requests are additive but if a sequence of requests totals more than
Long.MAX_VALUE
thenLong.MAX_VALUE
requests will be actioned and the extras may be ignored. Arriving atLong.MAX_VALUE
by addition of requests cannot be assumed to disable backpressure. For example, the code below may result inLong.MAX_VALUE
requests being actioned only.request(100); request(Long.MAX_VALUE-1);
-