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
Constructors Constructor Description BytesReadTrackingPublisher(org.reactivestreams.Publisher<ByteBuffer> upstream, AtomicLong bytesRead)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
bytesRead()
void
subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> subscriber)
-
-
-
Constructor Detail
-
BytesReadTrackingPublisher
public BytesReadTrackingPublisher(org.reactivestreams.Publisher<ByteBuffer> upstream, AtomicLong bytesRead)
-
-
Method Detail
-
subscribe
public void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> subscriber)
- Specified by:
subscribe
in interfaceorg.reactivestreams.Publisher<ByteBuffer>
-
bytesRead
public long bytesRead()
-
-