类 SentinelReactorSubscriber<T>
java.lang.Object
com.alibaba.csp.sentinel.adapter.reactor.SentinelReactorSubscriber<T>
- 所有已实现的接口:
org.reactivestreams.Subscriber<T>,org.reactivestreams.Subscription,reactor.core.CoreSubscriber<T>,reactor.core.Disposable
- 从以下版本开始:
- 1.5.0
- 作者:
- Eric Zhao
-
嵌套类概要
从接口继承的嵌套类/接口 reactor.core.Disposable
reactor.core.Disposable.Composite, reactor.core.Disposable.Swap -
构造器概要
构造器构造器说明SentinelReactorSubscriber(EntryConfig entryConfig, reactor.core.CoreSubscriber<? super T> actual, boolean unary) -
方法概要
修饰符和类型方法说明final voidcancel()reactor.util.context.Contextvoiddispose()DisposetheSubscriptionbycancellingit.protected voidhookFinally(reactor.core.publisher.SignalType type) Optional hook executed after any of the termination events (onError, onComplete, cancel).protected voidOptional hook executed when the subscription is cancelled by calling this Subscriber'sSubscription.cancel()method.protected voidOptional hook for completion processing.protected voidOptional hook for error processing.protected voidhookOnNext(T value) Hook for processing of onNext values.protected voidhookOnSubscribe(org.reactivestreams.Subscription subscription) Hook for further processing of onSubscribe's Subscription.booleanvoidvoidvoidvoidonSubscribe(org.reactivestreams.Subscription s) final voidrequest(long n) final voidRequestan unbounded amount.protected booleantoString()protected org.reactivestreams.Subscriptionupstream()Return currentSubscription
-
构造器详细资料
-
SentinelReactorSubscriber
public SentinelReactorSubscriber(EntryConfig entryConfig, reactor.core.CoreSubscriber<? super T> actual, boolean unary)
-
-
方法详细资料
-
currentContext
public reactor.util.context.Context currentContext() -
hookOnSubscribe
protected void hookOnSubscribe(org.reactivestreams.Subscription subscription) Hook for further processing of onSubscribe's Subscription. Implement this method to callSubscription.request(long)as an initial request. Values other than the unboundedLong.MAX_VALUEimply that you'll also call request inhookOnNext(Object).Defaults to request unbounded Long.MAX_VALUE as in
requestUnbounded()- 参数:
subscription- the subscription to optionally process
-
hookOnNext
Hook for processing of onNext values. You can callSubscription.request(long)here to further request data from the sourceorg.reactivestreams.Publisherif theinitial requestwasn't unbounded.Defaults to doing nothing.
- 参数:
value- the emitted value to process
-
hookOnComplete
protected void hookOnComplete()Optional hook for completion processing. Defaults to doing nothing. -
shouldCallErrorDropHook
protected boolean shouldCallErrorDropHook() -
hookOnError
Optional hook for error processing. Default is to callExceptions.errorCallbackNotImplemented(Throwable).- 参数:
t- the error to process
-
hookOnCancel
protected void hookOnCancel()Optional hook executed when the subscription is cancelled by calling this Subscriber'sSubscription.cancel()method. Defaults to doing nothing. -
upstream
protected org.reactivestreams.Subscription upstream()Return currentSubscription- 返回:
- current
Subscription
-
isDisposed
public boolean isDisposed()- 指定者:
isDisposed在接口中reactor.core.Disposable
-
dispose
public void dispose()DisposetheSubscriptionbycancellingit.- 指定者:
dispose在接口中reactor.core.Disposable
-
hookFinally
protected void hookFinally(reactor.core.publisher.SignalType type) Optional hook executed after any of the termination events (onError, onComplete, cancel). The hook is executed in addition to and afterhookOnError(Throwable),hookOnComplete()andhookOnCancel()hooks, even if these callbacks fail. Defaults to doing nothing. A failure of the callback will be caught byOperators#onErrorDropped(Throwable, reactor.util.context.Context).- 参数:
type- the type of termination event that triggered the hook (SignalType.ON_ERROR,SignalType.ON_COMPLETEorSignalType.CANCEL)
-
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription s) - 指定者:
onSubscribe在接口中reactor.core.CoreSubscriber<T>- 指定者:
onSubscribe在接口中org.reactivestreams.Subscriber<T>
-
onNext
- 指定者:
onNext在接口中org.reactivestreams.Subscriber<T>
-
onError
- 指定者:
onError在接口中org.reactivestreams.Subscriber<T>
-
onComplete
public void onComplete()- 指定者:
onComplete在接口中org.reactivestreams.Subscriber<T>
-
request
public final void request(long n) - 指定者:
request在接口中org.reactivestreams.Subscription
-
requestUnbounded
public final void requestUnbounded()Requestan unbounded amount. -
cancel
public final void cancel()- 指定者:
cancel在接口中org.reactivestreams.Subscription
-
toString
-