public interface WriteChannel extends WritableByteChannel, Closeable, Restorable<WriteChannel>
Implementations of this class may further buffer data internally to reduce remote calls.
Written data might not be visible until calling Channel.close()
. This interface implements
Restorable
to allow saving the writer's state to continue writing afterwards.
Modifier and Type | Method and Description |
---|---|
RestorableState<WriteChannel> |
capture()
Captures the write channel state so that it can be saved and restored afterwards.
|
void |
setChunkSize(int chunkSize)
Sets the minimum size that will be written by a single RPC.
|
write
void setChunkSize(int chunkSize)
RestorableState<WriteChannel> capture()
WriteChannel
and the restored one should not both be used. Closing one channel causes
the other channel to close; subsequent writes will fail.capture
in interface Restorable<WriteChannel>
RestorableState
object that contains the write channel state and can restore
it afterwards.Copyright © 2019 Google LLC. All rights reserved.