Class OperatorReplay.BoundedReplayBuffer<T>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void addLast​(OperatorReplay.Node n)
      Add a new node to the linked list.
      (package private) void collect​(java.util.Collection<? super T> output)  
      void complete()
      Adds a completion event to the buffer
      (package private) java.lang.Object enterTransform​(java.lang.Object value)
      Override this to wrap the NotificationLite object into a container to be used later by truncate.
      void error​(java.lang.Throwable e)
      Adds a terminal exception to the buffer
      (package private) OperatorReplay.Node getInitialHead()
      Returns the current head for initializing the replay location for a new subscriber.
      (package private) boolean hasCompleted()  
      (package private) boolean hasError()  
      (package private) java.lang.Object leaveTransform​(java.lang.Object value)
      Override this to unwrap the transformed value into a NotificationLite object.
      void next​(T value)
      Adds a regular value to the buffer.
      (package private) void removeFirst()
      Remove the first node from the linked list.
      (package private) void removeSome​(int n)  
      void replay​(OperatorReplay.InnerProducer<T> output)
      Tries to replay the buffered values to the subscriber inside the output if there is new value and requests available at the same time.
      (package private) void setFirst​(OperatorReplay.Node n)
      Arranges the given node is the new head from now on.
      (package private) void truncate()
      Override this method to truncate a non-terminated buffer based on its current properties.
      (package private) void truncateFinal()
      Override this method to truncate a terminated buffer based on its properties (i.e., truncate but the very last node).
      • Methods inherited from class java.util.concurrent.atomic.AtomicReference

        accumulateAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndAccumulate, getAndSet, getAndUpdate, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
      • Methods inherited from class java.lang.Object

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

      • BoundedReplayBuffer

        public BoundedReplayBuffer()
    • Method Detail

      • addLast

        final void addLast​(OperatorReplay.Node n)
        Add a new node to the linked list.
        Parameters:
        n -
      • removeFirst

        final void removeFirst()
        Remove the first node from the linked list.
      • removeSome

        final void removeSome​(int n)
      • setFirst

        final void setFirst​(OperatorReplay.Node n)
        Arranges the given node is the new head from now on.
        Parameters:
        n -
      • getInitialHead

        OperatorReplay.Node getInitialHead()
        Returns the current head for initializing the replay location for a new subscriber. Override it to consider linked but outdated elements.
        Returns:
        the current head
      • enterTransform

        java.lang.Object enterTransform​(java.lang.Object value)
        Override this to wrap the NotificationLite object into a container to be used later by truncate.
        Parameters:
        value -
        Returns:
      • leaveTransform

        java.lang.Object leaveTransform​(java.lang.Object value)
        Override this to unwrap the transformed value into a NotificationLite object.
        Parameters:
        value -
        Returns:
      • truncate

        void truncate()
        Override this method to truncate a non-terminated buffer based on its current properties.
      • truncateFinal

        void truncateFinal()
        Override this method to truncate a terminated buffer based on its properties (i.e., truncate but the very last node).
      • collect

        final void collect​(java.util.Collection<? super T> output)
      • hasError

        boolean hasError()
      • hasCompleted

        boolean hasCompleted()