public interface DataStreamOutput extends CloseAsync<DataStreamReply>
| 限定符和类型 | 方法和说明 |
|---|---|
CompletableFuture<RaftClientReply> |
getRaftClientReplyFuture()
Return the future of the
RaftClientReply
which will be received once this stream has been closed successfully. |
WritableByteChannel |
getWritableByteChannel() |
CompletableFuture<DataStreamReply> |
writeAsync(ByteBuffer src,
Iterable<WriteOption> options)
Send out the data in the source buffer asynchronously.
|
default CompletableFuture<DataStreamReply> |
writeAsync(ByteBuffer src,
WriteOption... options)
Send out the data in the source buffer asynchronously.
|
default CompletableFuture<DataStreamReply> |
writeAsync(File src,
long position,
long count,
WriteOption... options)
The same as writeAsync(FilePositionCount.valueOf(src, position, count), options).
|
CompletableFuture<DataStreamReply> |
writeAsync(FilePositionCount src,
WriteOption... options)
Send out the data in the source file asynchronously.
|
default CompletableFuture<DataStreamReply> |
writeAsync(File src,
WriteOption... options)
The same as writeAsync(src, 0, src.length(), options).
|
close, closeAsyncdefault CompletableFuture<DataStreamReply> writeAsync(ByteBuffer src, WriteOption... options)
src - the source buffer to be sent.options - - options specifying how the data was writtenCompletableFuture<DataStreamReply> writeAsync(ByteBuffer src, Iterable<WriteOption> options)
src - the source buffer to be sent.options - - options specifying how the data was writtendefault CompletableFuture<DataStreamReply> writeAsync(File src, WriteOption... options)
default CompletableFuture<DataStreamReply> writeAsync(File src, long position, long count, WriteOption... options)
CompletableFuture<DataStreamReply> writeAsync(FilePositionCount src, WriteOption... options)
src - the source file with the starting position and the number of bytes.options - options specifying how the data was writtenCompletableFuture<RaftClientReply> getRaftClientReplyFuture()
RaftClientReply
which will be received once this stream has been closed successfully.
Note that this method does not trigger closing this stream.RaftClientReply.WritableByteChannel getWritableByteChannel()
WritableByteChannel view of this DataStreamOutput.Copyright © 2017–2025 The Apache Software Foundation. All rights reserved.