Package com.backblaze.b2.client
Class B2AlreadyStoredPartStorer
- java.lang.Object
-
- com.backblaze.b2.client.B2AlreadyStoredPartStorer
-
- All Implemented Interfaces:
B2PartStorer
public class B2AlreadyStoredPartStorer extends java.lang.Object implements B2PartStorer
This implementation "stores" a part that has already been successfully stored in B2. Its intended use is in retrying or resuming the storage of a large file, after an attempt where some, but not all, parts were successfully stored. When resuming the storage of a large part, use this class for parts that are already stored, and do not need to be stored again.
-
-
Constructor Summary
Constructors Constructor Description B2AlreadyStoredPartStorer(B2Part part)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)intgetPartNumber()longgetPartSizeOrThrow()inthashCode()B2PartstorePart(B2LargeFileStorer largeFileStorer, B2UploadListener uploadListener, B2CancellationToken cancellationToken)Store the part this B2PartStorer is responsible for.
-
-
-
Constructor Detail
-
B2AlreadyStoredPartStorer
public B2AlreadyStoredPartStorer(B2Part part)
-
-
Method Detail
-
getPartSizeOrThrow
public long getPartSizeOrThrow()
- Specified by:
getPartSizeOrThrowin interfaceB2PartStorer- Returns:
- The size of the part that this object will store, or throw if that cannot be determined.
-
getPartNumber
public int getPartNumber()
- Specified by:
getPartNumberin interfaceB2PartStorer- Returns:
- The part number this object will store.
-
storePart
public B2Part storePart(B2LargeFileStorer largeFileStorer, B2UploadListener uploadListener, B2CancellationToken cancellationToken)
Description copied from interface:B2PartStorerStore the part this B2PartStorer is responsible for.- Specified by:
storePartin interfaceB2PartStorer- 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.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-