Class 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
    • 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 a Throwable 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
      • Methods inherited from class java.lang.Number

        byteValue, shortValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • downstream

        final org.reactivestreams.Subscriber<? super T> downstream
      • disposeState

        final Consumer<? super S> disposeState
      • state

        S state
      • cancelled

        volatile boolean cancelled
      • terminate

        boolean terminate
      • hasNext

        boolean hasNext
    • Constructor Detail

      • GeneratorSubscription

        GeneratorSubscription​(org.reactivestreams.Subscriber<? super T> actual,
                              BiFunction<S,​? super Emitter<T>,​S> generator,
                              Consumer<? super S> disposeState,
                              S initialState)
    • Method Detail

      • request

        public void request​(long n)
        Specified by:
        request in interface org.reactivestreams.Subscription
      • dispose

        private void dispose​(S s)
      • cancel

        public void cancel()
        Specified by:
        cancel in interface org.reactivestreams.Subscription
      • onNext

        public void onNext​(T t)
        Description copied from interface: Emitter
        Signal a normal value.
        Specified by:
        onNext in interface Emitter<T>
        Parameters:
        t - the value to signal, not null
      • onError

        public void onError​(java.lang.Throwable t)
        Description copied from interface: Emitter
        Signal a Throwable exception.
        Specified by:
        onError in interface Emitter<T>
        Parameters:
        t - the Throwable to signal, not null
      • onComplete

        public void onComplete()
        Description copied from interface: Emitter
        Signal a completion.
        Specified by:
        onComplete in interface Emitter<T>