public class MemoryBlobStore extends AbstractBlobStore
AbstractBlobStore.BlockId, AbstractBlobStore.DataBLOCK_SIZE_LIMIT, HASH_ALGORITHM, inUse, TYPE_DATA, TYPE_HASH, TYPE_HASH_COMPRESSED| Constructor and Description |
|---|
MemoryBlobStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache()
Clear the cache.
|
boolean |
deleteChunks(List<String> chunkIds,
long maxLastModifiedTime)
Ignores the maxlastModifiedTime
|
Iterator<String> |
getAllChunkIds(long maxLastModifiedTime)
Ignores the maxlastModifiedTime
|
protected boolean |
isMarkEnabled() |
protected void |
mark(AbstractBlobStore.BlockId id) |
protected byte[] |
readBlockFromBackend(AbstractBlobStore.BlockId id)
Load the block from the storage backend.
|
void |
startMark()
Start the mark phase.
|
protected void |
storeBlock(byte[] digest,
int level,
byte[] data)
Store a block of data.
|
int |
sweep()
Remove all unused blocks.
|
clearInUse, getBlobId, getBlobLength, getBlockSize, getBlockSizeMin, getInputStream, getOrCreateReferenceKey, getReference, load, mark, markInUse, readBlob, resolveChunks, setBlockSize, setBlockSizeMin, setReferenceKey, setReferenceKeyEncoded, setReferenceKeyPlainText, usesBlobId, writeBlob, writeBlobprotected byte[] readBlockFromBackend(AbstractBlobStore.BlockId id)
AbstractBlobStorereadBlockFromBackend in class AbstractBlobStoreid - the block idprotected void storeBlock(byte[] digest,
int level,
byte[] data)
AbstractBlobStorestoreBlock in class AbstractBlobStoredigest - the content hashlevel - the indirection level (0 is for user data, 1 is a list of
digests that point to user data, 2 is a list of digests that
point to digests, and so on). This parameter is for
informational use only, and it is not required to store it
unless that's easy to achievedata - the data to be storedpublic void startMark()
throws IOException
GarbageCollectableBlobStorestartMark in interface GarbageCollectableBlobStorestartMark in class AbstractBlobStoreIOExceptionprotected boolean isMarkEnabled()
isMarkEnabled in class AbstractBlobStoreprotected void mark(AbstractBlobStore.BlockId id)
mark in class AbstractBlobStorepublic int sweep()
GarbageCollectableBlobStoresweep in interface GarbageCollectableBlobStoresweep in class AbstractBlobStorepublic boolean deleteChunks(List<String> chunkIds, long maxLastModifiedTime) throws Exception
chunkIds - the chunk idsmaxLastModifiedTime - the max last modified time to consider for retrievalException - the exceptionpublic Iterator<String> getAllChunkIds(long maxLastModifiedTime) throws Exception
maxLastModifiedTime - the max last modified time to consider for retrievalException - the exceptionpublic void clearCache()
GarbageCollectableBlobStoreCopyright © 2012-2015 The Apache Software Foundation. All Rights Reserved.