Package org.nuxeo.ecm.core.blob.scroll
Class AbstractBlobScroll<T extends BlobStoreBlobProvider>
java.lang.Object
org.nuxeo.ecm.core.blob.scroll.AbstractBlobScroll<T>
- All Implemented Interfaces:
AutoCloseable,Iterator<List<String>>,Scroll
- Direct Known Subclasses:
AzureBlobScroll,GoogleStorageBlobScroll,GridFSBlobScroll,InMemoryBlobScroll,LocalBlobScroll,S3BlobScroll
public abstract class AbstractBlobScroll<T extends BlobStoreBlobProvider>
extends Object
implements Scroll
Abstract class to scroll blobs from a blob provider, the scroll query is the provider id.
- Since:
- 2023
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected KeyStrategyprotected Stringprotected intprotected static final Stringprotected longprotected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanAdds the blob key to the list if it is valid (e.g. looks like a digest if the provider has digest strategy).voidclose()static StringgetBlobKey(String id) static LonggetBlobSize(String id) voidinit(ScrollRequest request, Map<String, String> options) Initialization of the iterator.protected abstract voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Field Details
-
SIZE_DELIMITER
- See Also:
-
isKeyPrefixed
protected boolean isKeyPrefixed -
keyStrategy
-
providerId
-
size
protected int size -
totalBlobCount
protected long totalBlobCount -
totalBlobSizeCount
protected long totalBlobSizeCount
-
-
Constructor Details
-
AbstractBlobScroll
public AbstractBlobScroll()
-
-
Method Details
-
init
Description copied from interface:ScrollInitialization of the iterator. -
addTo
Adds the blob key to the list if it is valid (e.g. looks like a digest if the provider has digest strategy).The key added to the list will be prefixed with the provider id if it has to be.
The key added to the list will be suffixed with the size of the associated blob with the
SIZE_DELIMITERseparator.- Parameters:
list- the list to bekey- the blob keygetSize- supplier to sum the total size- Returns:
- true if the key was added to the list
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceScroll
-
init
-
getBlobKey
-
getBlobSize
-