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 Details

    • BytesReadTrackingPublisher

      public BytesReadTrackingPublisher(org.reactivestreams.Publisher<ByteBuffer> upstream, AtomicLong bytesRead)
  • Method Details

    • subscribe

      public void subscribe(org.reactivestreams.Subscriber<? super ByteBuffer> subscriber)
      Specified by:
      subscribe in interface org.reactivestreams.Publisher<ByteBuffer>
    • bytesRead

      public long bytesRead()