Class MultiCacheOp<T>

  • Type Parameters:
    T - the type of item
    All Implemented Interfaces:
    Multi<T>, ContextSupport, org.reactivestreams.Publisher<T>, org.reactivestreams.Subscriber<T>

    public class MultiCacheOp<T>
    extends AbstractMultiOperator<T,​T>
    implements org.reactivestreams.Subscriber<T>, ContextSupport
    A multi caching the events emitted from upstreams and replaying it to subscribers. This multi can have several subscribers.
    • Constructor Detail

      • MultiCacheOp

        public MultiCacheOp​(Multi<T> upstream)
    • Method Detail

      • onSubscribe

        public void onSubscribe​(org.reactivestreams.Subscription s)
        Specified by:
        onSubscribe in interface org.reactivestreams.Subscriber<T>
      • onNext

        public void onNext​(T item)
        Specified by:
        onNext in interface org.reactivestreams.Subscriber<T>
      • onError

        public void onError​(java.lang.Throwable t)
        Specified by:
        onError in interface org.reactivestreams.Subscriber<T>
      • onComplete

        public void onComplete()
        Specified by:
        onComplete in interface org.reactivestreams.Subscriber<T>
      • context

        public Context context()
        Description copied from interface: ContextSupport
        Provide a context.

        Since calls to this method shall only be triggered when a Mutiny pipeline uses a withContext operator, there is no need in general for caching the context value in a field of the implementing class. Exceptions include operators that have cross-subscriber semantics such as memoizers or broadcasters.

        This method is expected to be called once per withContext operator.

        Specified by:
        context in interface ContextSupport
        Returns:
        the context, must not be null.