Package com.backblaze.b2.client
Interface B2PartStorer
-
- All Known Implementing Classes:
B2AlreadyStoredPartStorer,B2CopyingPartStorer,B2UploadingPartStorer
public interface B2PartStorerImplementations of B2PartStorer are responsible for storing a single part of a large file in B2.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetPartNumber()longgetPartSizeOrThrow()B2PartstorePart(B2LargeFileStorer largeFileStorer, B2UploadListener uploadListener, B2CancellationToken cancellationToken)Store the part this B2PartStorer is responsible for.
-
-
-
Method Detail
-
getPartNumber
int getPartNumber()
- Returns:
- The part number this object will store.
-
getPartSizeOrThrow
long getPartSizeOrThrow() throws B2CannotComputeException- Returns:
- The size of the part that this object will store, or throw if that cannot be determined.
- Throws:
B2CannotComputeException
-
storePart
B2Part storePart(B2LargeFileStorer largeFileStorer, B2UploadListener uploadListener, B2CancellationToken cancellationToken) throws java.io.IOException, B2Exception
Store the part this B2PartStorer is responsible for.- Parameters:
largeFileStorer- The object managing the storage of the whole large file.uploadListener- The listener that tracks upload progress events.cancellationToken- token to check whether the action has been cancelled- Returns:
- The part that is stored, if successful.
- Throws:
B2Exception- if there's trouble.java.io.IOException
-
-