类 ChannelSendOperator.WriteBarrier
java.lang.Object
cn.taketoday.http.server.reactive.ChannelSendOperator.WriteBarrier
- 所有已实现的接口:
org.reactivestreams.Publisher<T>,org.reactivestreams.Subscriber<T>,org.reactivestreams.Subscription,reactor.core.CoreSubscriber<T>
- 封闭类:
- ChannelSendOperator<T>
private class ChannelSendOperator.WriteBarrier
extends Object
implements reactor.core.CoreSubscriber<T>, org.reactivestreams.Subscription, org.reactivestreams.Publisher<T>
A barrier inserted between the write source and the write subscriber
(i.e. the HTTP server adapter) that pre-fetches and waits for the first
signal before deciding whether to hook in to the write subscriber.
Acts as:
- Subscriber to the write source.
- Subscription to the write subscriber.
- Publisher to the write subscriber.
Also uses ChannelSendOperator<T>.WriteCompletionBarrier to communicate completion
and detect cancel signals from the completion subscriber.
-
字段概要
字段修饰符和类型字段说明private booleanCached onComplete signal before readyToWrite.private longRecursive demand while emitting cached signals.private ThrowableCached error signal before readyToWrite.private TCached data item before readyToWrite.private ChannelSendOperator.StateCurrent state.private org.reactivestreams.Subscriptionprivate final ChannelSendOperator<T>.WriteCompletionBarrierprivate org.reactivestreams.Subscriber<? super T>The actual writeSubscriber from the HTTP server adapter. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidcancel()reactor.util.context.Contextprivate booleanfinal voidfinal voidfinal voidfinal voidonSubscribe(org.reactivestreams.Subscription s) private voidvoidrequest(long n) private org.reactivestreams.Subscriber<? super T>void
-
字段详细资料
-
writeCompletionBarrier
-
subscription
@Nullable private org.reactivestreams.Subscription subscription -
item
Cached data item before readyToWrite. -
error
Cached error signal before readyToWrite. -
completed
private boolean completedCached onComplete signal before readyToWrite. -
demandBeforeReadyToWrite
private long demandBeforeReadyToWriteRecursive demand while emitting cached signals. -
state
Current state. -
writeSubscriber
The actual writeSubscriber from the HTTP server adapter.
-
-
构造器详细资料
-
WriteBarrier
WriteBarrier(reactor.core.CoreSubscriber<? super Void> completionSubscriber)
-
-
方法详细资料
-
onSubscribe
public final void onSubscribe(org.reactivestreams.Subscription s) -
onNext
- 指定者:
onNext在接口中org.reactivestreams.Subscriber<T>
-
requiredWriteSubscriber
-
onError
- 指定者:
onError在接口中org.reactivestreams.Subscriber<T>
-
onComplete
public final void onComplete()- 指定者:
onComplete在接口中org.reactivestreams.Subscriber<T>
-
currentContext
public reactor.util.context.Context currentContext()- 指定者:
currentContext在接口中reactor.core.CoreSubscriber<T>
-
request
public void request(long n) - 指定者:
request在接口中org.reactivestreams.Subscription
-
emitCachedSignals
private boolean emitCachedSignals() -
cancel
public void cancel()- 指定者:
cancel在接口中org.reactivestreams.Subscription
-
releaseCachedItem
private void releaseCachedItem() -
subscribe
- 指定者:
subscribe在接口中org.reactivestreams.Publisher<T>
-