Class ByteBufferAsyncRequestBody
java.lang.Object
io.trino.plugin.exchange.filesystem.s3.ByteBufferAsyncRequestBody
- All Implemented Interfaces:
org.reactivestreams.Publisher<ByteBuffer>,software.amazon.awssdk.core.async.AsyncRequestBody,software.amazon.awssdk.core.async.SdkPublisher<ByteBuffer>
public final class ByteBufferAsyncRequestBody
extends Object
implements software.amazon.awssdk.core.async.AsyncRequestBody
This class mimics the implementation of
ByteArrayAsyncRequestBody except for we use a ByteBuffer
to avoid unnecessary memory copy
An implementation of AsyncRequestBody for providing data from memory. This is created using static
methods on AsyncRequestBody- See Also:
-
AsyncRequestBody.fromBytes(byte[])AsyncRequestBody.fromByteBuffer(ByteBuffer)AsyncRequestBody.fromString(String)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsubscribe(org.reactivestreams.Subscriber<? super ByteBuffer> s) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.core.async.SdkPublisher
buffer, doAfterOnCancel, doAfterOnComplete, doAfterOnError, filter, filter, flatMapIterable, limit, map, subscribe
-
Constructor Details
-
ByteBufferAsyncRequestBody
-
-
Method Details
-
contentLength
- Specified by:
contentLengthin interfacesoftware.amazon.awssdk.core.async.AsyncRequestBody
-
contentType
- Specified by:
contentTypein interfacesoftware.amazon.awssdk.core.async.AsyncRequestBody
-
subscribe
- Specified by:
subscribein interfaceorg.reactivestreams.Publisher<ByteBuffer>
-