Class MultiCacheOp<T>
- java.lang.Object
-
- io.smallrye.mutiny.operators.AbstractMulti<O>
-
- io.smallrye.mutiny.operators.multi.AbstractMultiOperator<T,T>
-
- io.smallrye.mutiny.operators.multi.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
Amulticaching the events emitted from upstreams and replaying it to subscribers. This multi can have several subscribers.
-
-
Field Summary
-
Fields inherited from class io.smallrye.mutiny.operators.multi.AbstractMultiOperator
upstream
-
-
Constructor Summary
Constructors Constructor Description MultiCacheOp(Multi<T> upstream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Contextcontext()Provide a context.voidonComplete()voidonError(java.lang.Throwable t)voidonNext(T item)voidonSubscribe(org.reactivestreams.Subscription s)voidsubscribe(MultiSubscriber<? super T> downstream)-
Methods inherited from class io.smallrye.mutiny.operators.multi.AbstractMultiOperator
upstream
-
Methods inherited from class io.smallrye.mutiny.operators.AbstractMulti
broadcast, cache, collect, convert, emitOn, group, ifNoItem, log, log, onCancellation, onCompletion, onFailure, onFailure, onFailure, onItem, onOverflow, onRequest, onSubscribe, onSubscription, onTermination, runSubscriptionOn, select, skip, subscribe, subscribe, toHotStream, toUni, withContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.smallrye.mutiny.Multi
attachContext, broadcast, cache, call, call, collect, concatMap, convert, emitOn, filter, flatMap, group, ifNoItem, invoke, invoke, log, log, map, onCancellation, onCompletion, onFailure, onFailure, onFailure, onItem, onOverflow, onRequest, onSubscribe, onSubscription, onTermination, plug, runSubscriptionOn, select, skip, stage, subscribe, toHotStream, toUni, withContext
-
-
-
-
Method Detail
-
subscribe
public void subscribe(MultiSubscriber<? super T> downstream)
- Overrides:
subscribein classAbstractMulti<T>
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription s)
- Specified by:
onSubscribein interfaceorg.reactivestreams.Subscriber<T>
-
onNext
public void onNext(T item)
- Specified by:
onNextin interfaceorg.reactivestreams.Subscriber<T>
-
onError
public void onError(java.lang.Throwable t)
- Specified by:
onErrorin interfaceorg.reactivestreams.Subscriber<T>
-
onComplete
public void onComplete()
- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<T>
-
context
public Context context()
Description copied from interface:ContextSupportProvide a context.Since calls to this method shall only be triggered when a Mutiny pipeline uses a
withContextoperator, 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
withContextoperator.- Specified by:
contextin interfaceContextSupport- Returns:
- the context, must not be
null.
-
-