Class FlowableGenerate.GeneratorSubscription<T,S>
- java.lang.Object
-
- java.lang.Number
-
- java.util.concurrent.atomic.AtomicLong
-
- io.reactivex.rxjava3.internal.operators.flowable.FlowableGenerate.GeneratorSubscription<T,S>
-
- All Implemented Interfaces:
Emitter<T>
,java.io.Serializable
,org.reactivestreams.Subscription
- Enclosing class:
- FlowableGenerate<T,S>
static final class FlowableGenerate.GeneratorSubscription<T,S> extends java.util.concurrent.atomic.AtomicLong implements Emitter<T>, org.reactivestreams.Subscription
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
cancelled
(package private) Consumer<? super S>
disposeState
(package private) org.reactivestreams.Subscriber<? super T>
downstream
(package private) BiFunction<S,? super Emitter<T>,S>
generator
(package private) boolean
hasNext
private static long
serialVersionUID
(package private) S
state
(package private) boolean
terminate
-
Constructor Summary
Constructors Constructor Description GeneratorSubscription(org.reactivestreams.Subscriber<? super T> actual, BiFunction<S,? super Emitter<T>,S> generator, Consumer<? super S> disposeState, S initialState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
private void
dispose(S s)
void
onComplete()
Signal a completion.void
onError(java.lang.Throwable t)
Signal aThrowable
exception.void
onNext(T t)
Signal a normal value.void
request(long n)
-
Methods inherited from class java.util.concurrent.atomic.AtomicLong
accumulateAndGet, addAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, decrementAndGet, doubleValue, floatValue, get, getAcquire, getAndAccumulate, getAndAdd, getAndDecrement, getAndIncrement, getAndSet, getAndUpdate, getOpaque, getPlain, incrementAndGet, intValue, lazySet, longValue, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
downstream
final org.reactivestreams.Subscriber<? super T> downstream
-
generator
final BiFunction<S,? super Emitter<T>,S> generator
-
state
S state
-
cancelled
volatile boolean cancelled
-
terminate
boolean terminate
-
hasNext
boolean hasNext
-
-
Method Detail
-
request
public void request(long n)
- Specified by:
request
in interfaceorg.reactivestreams.Subscription
-
dispose
private void dispose(S s)
-
cancel
public void cancel()
- Specified by:
cancel
in interfaceorg.reactivestreams.Subscription
-
onError
public void onError(java.lang.Throwable t)
Description copied from interface:Emitter
Signal aThrowable
exception.
-
onComplete
public void onComplete()
Description copied from interface:Emitter
Signal a completion.- Specified by:
onComplete
in interfaceEmitter<T>
-
-