Package com.google.cloud.storage
Class HttpCopyWriter
java.lang.Object
com.google.cloud.storage.CopyWriter
com.google.cloud.storage.HttpCopyWriter
- All Implemented Interfaces:
com.google.cloud.Restorable<CopyWriter>
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.cloud.RestorableState<CopyWriter>
capture()
void
Copies the next chunk of the blob.long
Returns the size of the blob being copied.Returns the updated information for the written blob.long
Returns the number of bytes copied.boolean
isDone()
Returnstrue
if blob copy has finished,false
otherwise.
-
Method Details
-
getResult
Description copied from class:CopyWriter
Returns the updated information for the written blob. Calling this method whenisDone()
isfalse
will block until all pending chunks are copied.This method has the same effect of doing:
while (!copyWriter.isDone()) { copyWriter.copyChunk(); }
- Specified by:
getResult
in classCopyWriter
-
getBlobSize
public long getBlobSize()Description copied from class:CopyWriter
Returns the size of the blob being copied.- Specified by:
getBlobSize
in classCopyWriter
-
isDone
public boolean isDone()Description copied from class:CopyWriter
Returnstrue
if blob copy has finished,false
otherwise.- Specified by:
isDone
in classCopyWriter
-
getTotalBytesCopied
public long getTotalBytesCopied()Description copied from class:CopyWriter
Returns the number of bytes copied.- Specified by:
getTotalBytesCopied
in classCopyWriter
-
copyChunk
public void copyChunk()Description copied from class:CopyWriter
Copies the next chunk of the blob. An RPC is issued only if copy has not finished yet (CopyWriter.isDone()
returnsfalse
).- Specified by:
copyChunk
in classCopyWriter
-
capture
- Specified by:
capture
in interfacecom.google.cloud.Restorable<CopyWriter>
- Specified by:
capture
in classCopyWriter
-