类 OutputStreamPublisher.OutputStreamSubscription
java.lang.Object
java.io.OutputStream
cn.taketoday.core.io.buffer.OutputStreamPublisher.OutputStreamSubscription
- 所有已实现的接口:
Closeable,Flushable,AutoCloseable,org.reactivestreams.Subscription
private static final class OutputStreamPublisher.OutputStreamSubscription
extends OutputStream
implements org.reactivestreams.Subscription
-
字段概要
字段修饰符和类型字段说明private final org.reactivestreams.Subscriber<? super DataBuffer>private final DataBufferFactoryprivate final intprivate Throwableprivate final Consumer<OutputStream>private final AtomicReference<Object>private longprivate static final Objectprivate final AtomicLong -
构造器概要
构造器构造器说明OutputStreamSubscription(org.reactivestreams.Subscriber<? super DataBuffer> actual, Consumer<OutputStream> outputStreamConsumer, DataBufferFactory bufferFactory, int chunkSize) -
方法概要
修饰符和类型方法说明private longaddCap(long n) private static longaddCap(long a, long b) private voidawait()voidcancel()private voidvoidprivate static booleanisCancelled(long state) private static booleanisTerminated(long state) voidrequest(long n) private voidresume()private longprivate longtryProduce(long n) private longvoidwrite(byte[] b) voidwrite(byte[] b, int off, int len) voidwrite(int b) 从类继承的方法 java.io.OutputStream
close, flush, nullOutputStream
-
字段详细资料
-
READY
-
actual
-
outputStreamHandler
-
bufferFactory
-
chunkSize
private final int chunkSize -
requested
-
parkedThread
-
error
-
produced
private long produced
-
-
构造器详细资料
-
OutputStreamSubscription
public OutputStreamSubscription(org.reactivestreams.Subscriber<? super DataBuffer> actual, Consumer<OutputStream> outputStreamConsumer, DataBufferFactory bufferFactory, int chunkSize)
-
-
方法详细资料
-
write
- 指定者:
write在类中OutputStream- 抛出:
IOException
-
write
- 覆盖:
write在类中OutputStream- 抛出:
IOException
-
write
- 覆盖:
write在类中OutputStream- 抛出:
IOException
-
checkDemandAndAwaitIfNeeded
- 抛出:
IOException
-
invokeHandler
public void invokeHandler() -
request
public void request(long n) - 指定者:
request在接口中org.reactivestreams.Subscription
-
cancel
public void cancel()- 指定者:
cancel在接口中org.reactivestreams.Subscription
-
await
private void await() -
resume
private void resume() -
tryCancel
private long tryCancel() -
tryTerminate
private long tryTerminate() -
tryProduce
private long tryProduce(long n) -
addCap
private long addCap(long n) -
isTerminated
private static boolean isTerminated(long state) -
isCancelled
private static boolean isCancelled(long state) -
addCap
private static long addCap(long a, long b)
-