Class OperatorZip.Zip<R>

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    OperatorZip<R>

    static final class OperatorZip.Zip<R>
    extends java.util.concurrent.atomic.AtomicLong
    • Constructor Summary

      Constructors 
      Constructor Description
      Zip​(Subscriber<? super R> child, FuncN<? extends R> zipFunction)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void start​(Observable[] os, java.util.concurrent.atomic.AtomicLong requested)  
      (package private) void tick()
      check if we have values for each and emit if we do This will only allow one thread at a time to do the work, but ensures via `counter` increment/decrement that there is always once who acts on each `tick`.
      • 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

      • zipFunction

        private final FuncN<? extends R> zipFunction
      • THRESHOLD

        static final int THRESHOLD
      • emitted

        int emitted
      • subscribers

        private volatile java.lang.Object[] subscribers
      • requested

        private java.util.concurrent.atomic.AtomicLong requested
    • Constructor Detail

    • Method Detail

      • start

        public void start​(Observable[] os,
                          java.util.concurrent.atomic.AtomicLong requested)
      • tick

        void tick()
        check if we have values for each and emit if we do This will only allow one thread at a time to do the work, but ensures via `counter` increment/decrement that there is always once who acts on each `tick`. Same concept as used in OperationObserveOn.