类 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

public class SentinelReactorSubscriber<T> extends Object
从以下版本开始:
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 void
     
    reactor.util.context.Context
     
    void
    Dispose the Subscription by cancelling it.
    protected void
    hookFinally(reactor.core.publisher.SignalType type)
    Optional hook executed after any of the termination events (onError, onComplete, cancel).
    protected void
    Optional hook executed when the subscription is cancelled by calling this Subscriber's Subscription.cancel() method.
    protected void
    Optional hook for completion processing.
    protected void
    Optional hook for error processing.
    protected void
    hookOnNext(T value)
    Hook for processing of onNext values.
    protected void
    hookOnSubscribe(org.reactivestreams.Subscription subscription)
    Hook for further processing of onSubscribe's Subscription.
    boolean
     
    void
     
    void
     
    void
    onNext(T value)
     
    void
    onSubscribe(org.reactivestreams.Subscription s)
     
    final void
    request(long n)
     
    final void
    Request an unbounded amount.
    protected boolean
     
     
    protected org.reactivestreams.Subscription
    Return current Subscription

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 构造器详细资料

    • 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 call Subscription.request(long) as an initial request. Values other than the unbounded Long.MAX_VALUE imply that you'll also call request in hookOnNext(Object).

      Defaults to request unbounded Long.MAX_VALUE as in requestUnbounded()

      参数:
      subscription - the subscription to optionally process
    • hookOnNext

      protected void hookOnNext(T value)
      Hook for processing of onNext values. You can call Subscription.request(long) here to further request data from the source org.reactivestreams.Publisher if the initial request wasn'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

      protected void hookOnError(Throwable t)
      Optional hook for error processing. Default is to call Exceptions.errorCallbackNotImplemented(Throwable).
      参数:
      t - the error to process
    • hookOnCancel

      protected void hookOnCancel()
      Optional hook executed when the subscription is cancelled by calling this Subscriber's Subscription.cancel() method. Defaults to doing nothing.
    • upstream

      protected org.reactivestreams.Subscription upstream()
      Return current Subscription
      返回:
      current Subscription
    • isDisposed

      public boolean isDisposed()
      指定者:
      isDisposed 在接口中 reactor.core.Disposable
    • dispose

      public void dispose()
      Dispose the Subscription by cancelling it.
      指定者:
      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 after hookOnError(Throwable), hookOnComplete() and hookOnCancel() hooks, even if these callbacks fail. Defaults to doing nothing. A failure of the callback will be caught by Operators#onErrorDropped(Throwable, reactor.util.context.Context).
      参数:
      type - the type of termination event that triggered the hook (SignalType.ON_ERROR, SignalType.ON_COMPLETE or SignalType.CANCEL)
    • onSubscribe

      public void onSubscribe(org.reactivestreams.Subscription s)
      指定者:
      onSubscribe 在接口中 reactor.core.CoreSubscriber<T>
      指定者:
      onSubscribe 在接口中 org.reactivestreams.Subscriber<T>
    • onNext

      public void onNext(T value)
      指定者:
      onNext 在接口中 org.reactivestreams.Subscriber<T>
    • onError

      public void onError(Throwable t)
      指定者:
      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()
      Request an unbounded amount.
    • cancel

      public final void cancel()
      指定者:
      cancel 在接口中 org.reactivestreams.Subscription
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object