Class BytesReadTrackingPublisher
java.lang.Object
software.amazon.awssdk.core.internal.metrics.BytesReadTrackingPublisher
- All Implemented Interfaces:
org.reactivestreams.Publisher<ByteBuffer>
public final class BytesReadTrackingPublisher
extends Object
implements org.reactivestreams.Publisher<ByteBuffer>
Publisher that tracks how many bytes are published from the wrapped publisher to the downstream subscriber.
-
Constructor Summary
ConstructorsConstructorDescriptionBytesReadTrackingPublisher
(org.reactivestreams.Publisher<ByteBuffer> upstream, AtomicLong bytesRead) -
Method Summary
Modifier and TypeMethodDescriptionlong
void
subscribe
(org.reactivestreams.Subscriber<? super ByteBuffer> subscriber)
-
Constructor Details
-
BytesReadTrackingPublisher
public BytesReadTrackingPublisher(org.reactivestreams.Publisher<ByteBuffer> upstream, AtomicLong bytesRead)
-
-
Method Details
-
subscribe
- Specified by:
subscribe
in interfaceorg.reactivestreams.Publisher<ByteBuffer>
-
bytesRead
public long bytesRead()
-