Interface GarbageCollectableBlobStore
- 
- All Superinterfaces:
 java.lang.AutoCloseable,BlobStore
- All Known Implementing Classes:
 AbstractBlobStore,CachingBlobStore,DataStoreBlobStore,FileBlobStore,MemoryBlobStore
@ProviderType public interface GarbageCollectableBlobStore extends BlobStore
A blob store that supports garbage collection. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidclearCache()Clear the cache.voidclearInUse()Clear all objects marked as "transiently in use".longcountDeleteChunks(java.util.List<java.lang.String> chunkIds, long maxLastModifiedTime)Deletes the blobs with the given ids.booleandeleteChunks(java.util.List<java.lang.String> chunkIds, long maxLastModifiedTime)Deprecated.java.util.Iterator<java.lang.String>getAllChunkIds(long maxLastModifiedTime)Gets all the identifiers.longgetBlockSizeMin()Get the minimum block size (if there is any).java.util.Iterator<java.lang.String>resolveChunks(java.lang.String blobId)Resolve chunks stored in the blob store from the given Id.voidsetBlockSize(int x)Set the block size used by this blob store, if the blob store splits binaries into blocks.voidstartMark()Start the mark phase.intsweep()Remove all unused blocks.java.lang.StringwriteBlob(java.lang.String tempFileName)Write a blob from a temporary file.- 
Methods inherited from interface org.apache.jackrabbit.oak.spi.blob.BlobStore
getBlobId, getBlobLength, getInputStream, getReference, readBlob, writeBlob, writeBlob 
 - 
 
 - 
 
- 
- 
Method Detail
- 
setBlockSize
void setBlockSize(int x)
Set the block size used by this blob store, if the blob store splits binaries into blocks. If not, this setting is ignored.- Parameters:
 x- the block size in bytes.
 
- 
writeBlob
java.lang.String writeBlob(java.lang.String tempFileName) throws java.io.IOExceptionWrite a blob from a temporary file. The temporary file is removed afterwards. A file based blob stores might simply rename the file, so that no additional writes are necessary.- Parameters:
 tempFileName- the temporary file name- Returns:
 - the blob id
 - Throws:
 java.io.IOException
 
- 
sweep
int sweep() throws java.io.IOException
Remove all unused blocks.- Returns:
 - the number of removed blocks
 - Throws:
 java.io.IOException
 
- 
startMark
void startMark() throws java.io.IOExceptionStart the mark phase.- Throws:
 java.io.IOException
 
- 
clearInUse
void clearInUse()
Clear all objects marked as "transiently in use". 
- 
clearCache
void clearCache()
Clear the cache. 
- 
getBlockSizeMin
long getBlockSizeMin()
Get the minimum block size (if there is any).- Returns:
 - the block size
 
 
- 
getAllChunkIds
java.util.Iterator<java.lang.String> getAllChunkIds(long maxLastModifiedTime) throws java.lang.ExceptionGets all the identifiers.- Parameters:
 maxLastModifiedTime- the max last modified time to consider for retrieval, with the special value '0' meaning no filtering by time- Returns:
 - the identifiers
 - Throws:
 java.lang.Exception- the exception
 
- 
deleteChunks
@Deprecated boolean deleteChunks(java.util.List<java.lang.String> chunkIds, long maxLastModifiedTime) throws java.lang.ExceptionDeprecated.Deletes the blobs with the given ids.- Parameters:
 chunkIds- the chunk idsmaxLastModifiedTime- the max last modified time to consider for retrieval, with the special value '0' meaning no filtering by time- Returns:
 - true, if successful
 - Throws:
 java.lang.Exception- the exception
 
- 
countDeleteChunks
long countDeleteChunks(java.util.List<java.lang.String> chunkIds, long maxLastModifiedTime) throws java.lang.ExceptionDeletes the blobs with the given ids.- Parameters:
 chunkIds- the chunk idsmaxLastModifiedTime- the max last modified time to consider for retrieval, with the special value '0' meaning no filtering by time- Returns:
 - long the count of successful deletions
 - Throws:
 java.lang.Exception- the exception
 
- 
resolveChunks
java.util.Iterator<java.lang.String> resolveChunks(java.lang.String blobId) throws java.io.IOExceptionResolve chunks stored in the blob store from the given Id. This will not return any chunks stored in-line in the id.- Parameters:
 blobId- the blob id- Returns:
 - the iterator
 - Throws:
 java.io.IOException- Signals that an I/O exception has occurred.
 
 - 
 
 -