public class CloudBlobStore extends CachingBlobStore
BlobStore to store blobs in a cloud blob store.
Extends AbstractBlobStore and breaks the the binary to chunks for easier management.
blobCacheSize, cache, DEFAULT_CACHE_SIZE, MEM_CACHE_NAME| Constructor and Description |
|---|
CloudBlobStore() |
| Modifier and Type | Method and Description |
|---|---|
long |
countDeleteChunks(List<String> chunkIds,
long maxLastModifiedTime) |
void |
deleteBucket()
Delete the cloud container and all its contents.
|
String |
getAccessKey() |
Iterator<String> |
getAllChunkIds(long maxLastModifiedTime) |
protected String |
getCloudContainer() |
String |
getCloudProvider() |
String |
getSecretKey() |
void |
init()
Instantiates a connection to the cloud blob store.
|
protected boolean |
isMarkEnabled() |
protected void |
mark(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.
|
void |
setAccessKey(String accessKey) |
void |
setCloudContainer(String cloudContainer) |
void |
setCloudProvider(String cloudProvider) |
void |
setSecretKey(String secretKey) |
void |
startMark() |
protected void |
storeBlock(byte[] digest,
int level,
byte[] data)
Uploads the block to the cloud service.
|
int |
sweep() |
clearCache, getBlobCacheSize, getCacheStatsclearInUse, deleteChunks, getBlobId, getBlobLength, getBlockSize, getBlockSizeMin, getInputStream, getOrCreateReferenceKey, getReference, getStatsCollector, load, mark, markInUse, readBlob, resolveChunks, setBlockSize, setBlockSizeMin, setReferenceKey, setReferenceKeyEncoded, setReferenceKeyPlainText, setStatsCollector, usesBlobId, writeBlob, writeBlob, writeBlobprotected String getCloudContainer()
public void setCloudContainer(String cloudContainer)
public String getAccessKey()
public void setAccessKey(String accessKey)
public String getSecretKey()
public void setSecretKey(String secretKey)
public String getCloudProvider()
public void setCloudProvider(String cloudProvider)
public void init()
throws Exception
Exception - if an error occursprotected void storeBlock(byte[] digest,
int level,
byte[] data)
throws IOException
storeBlock in class org.apache.jackrabbit.oak.spi.blob.AbstractBlobStoreIOExceptionprotected byte[] readBlockFromBackend(org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId blockId)
throws Exception
readBlockFromBackend in class org.apache.jackrabbit.oak.spi.blob.AbstractBlobStoreExceptionpublic void deleteBucket()
public void startMark()
throws IOException
startMark in interface org.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStorestartMark in class org.apache.jackrabbit.oak.spi.blob.AbstractBlobStoreIOExceptionprotected void mark(org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId id)
throws Exception
mark in class org.apache.jackrabbit.oak.spi.blob.AbstractBlobStoreExceptionpublic int sweep()
throws IOException
sweep in interface org.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStoresweep in class org.apache.jackrabbit.oak.spi.blob.AbstractBlobStoreIOExceptionprotected boolean isMarkEnabled()
isMarkEnabled in class org.apache.jackrabbit.oak.spi.blob.AbstractBlobStorepublic Iterator<String> getAllChunkIds(long maxLastModifiedTime) throws Exception
ExceptionCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.