Class CloudBlobStore
java.lang.Object
org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
org.apache.jackrabbit.oak.plugins.blob.CachingBlobStore
org.apache.jackrabbit.oak.plugins.blob.cloud.CloudBlobStore
- All Implemented Interfaces:
AutoCloseable,org.apache.jackrabbit.oak.commons.cache.Cache.Backend<org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId,,org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.Data> org.apache.jackrabbit.oak.spi.blob.BlobStore,org.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore
Implementation of the
BlobStore to store blobs in a cloud blob store.
Extends AbstractBlobStore and breaks the the binary to chunks for easier management.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId, org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.Data -
Field Summary
Fields inherited from class org.apache.jackrabbit.oak.plugins.blob.CachingBlobStore
blobCacheSize, cache, DEFAULT_CACHE_SIZE, MEM_CACHE_NAMEFields inherited from class org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
BLOCK_SIZE_LIMIT, HASH_ALGORITHM, inUse, TYPE_DATA, TYPE_HASH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcountDeleteChunks(List<String> chunkIds, long maxLastModifiedTime) voidDelete the cloud container and all its contents.getAllChunkIds(long maxLastModifiedTime) protected Stringvoidinit()Instantiates a connection to the cloud blob store.protected booleanprotected voidmark(org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId id) protected byte[]readBlockFromBackend(org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId blockId) Reads the data from the actual cloud service.voidsetAccessKey(String accessKey) voidsetCloudContainer(String cloudContainer) voidsetCloudProvider(String cloudProvider) voidsetSecretKey(String secretKey) voidprotected voidstoreBlock(byte[] digest, int level, byte[] data) Uploads the block to the cloud service.intsweep()Methods inherited from class org.apache.jackrabbit.oak.plugins.blob.CachingBlobStore
clearCache, getBlobCacheSize, getCacheStatsMethods inherited from class org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
clearInUse, close, deleteChunks, getBlobId, getBlobLength, getBlockSize, getBlockSizeMin, getInputStream, getOrCreateReferenceKey, getReference, getStatsCollector, load, mark, markInUse, readBlob, resolveChunks, setBlockSize, setBlockSizeMin, setReferenceKey, setReferenceKeyEncoded, setReferenceKeyPlainText, setStatsCollector, usesBlobId, writeBlob, writeBlob, writeBlob
-
Constructor Details
-
CloudBlobStore
public CloudBlobStore()
-
-
Method Details
-
getCloudContainer
-
setCloudContainer
-
getAccessKey
-
setAccessKey
-
getSecretKey
-
setSecretKey
-
getCloudProvider
-
setCloudProvider
-
init
Instantiates a connection to the cloud blob store.- Throws:
Exception- if an error occurs
-
storeBlock
Uploads the block to the cloud service.- Specified by:
storeBlockin classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore- Throws:
IOException
-
readBlockFromBackend
protected byte[] readBlockFromBackend(org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId blockId) throws Exception Reads the data from the actual cloud service.- Specified by:
readBlockFromBackendin classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore- Throws:
Exception
-
deleteBucket
public void deleteBucket()Delete the cloud container and all its contents. -
startMark
- Specified by:
startMarkin interfaceorg.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore- Specified by:
startMarkin classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore- Throws:
IOException
-
mark
protected void mark(org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId id) throws Exception - Specified by:
markin classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore- Throws:
Exception
-
sweep
- Specified by:
sweepin interfaceorg.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore- Specified by:
sweepin classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore- Throws:
IOException
-
isMarkEnabled
protected boolean isMarkEnabled()- Specified by:
isMarkEnabledin classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
-
getAllChunkIds
- Throws:
Exception
-
countDeleteChunks
- Throws:
Exception
-