|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore
public class MemoryBlobStore
A memory blob store. Useful for testing.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore |
|---|
AbstractBlobStore.BlockId, AbstractBlobStore.Data |
| Field Summary |
|---|
| Fields inherited from class org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore |
|---|
BLOCK_SIZE_LIMIT, HASH_ALGORITHM, inUse, TYPE_DATA, TYPE_HASH, TYPE_HASH_COMPRESSED |
| Constructor Summary | |
|---|---|
MemoryBlobStore()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore |
|---|
clearInUse, getBlobId, getBlobLength, getBlockSize, getBlockSizeMin, getInputStream, getOrCreateReferenceKey, getReference, load, mark, markInUse, readBlob, resolveChunks, setBlockSize, setBlockSizeMin, setReferenceKey, setReferenceKeyEncoded, setReferenceKeyPlainText, usesBlobId, writeBlob, writeBlob |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryBlobStore()
| Method Detail |
|---|
protected byte[] readBlockFromBackend(AbstractBlobStore.BlockId id)
AbstractBlobStore
readBlockFromBackend in class AbstractBlobStoreid - the block id
protected void storeBlock(byte[] digest,
int level,
byte[] data)
AbstractBlobStore
storeBlock 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 stored
public void startMark()
throws IOException
GarbageCollectableBlobStore
startMark in interface GarbageCollectableBlobStorestartMark in class AbstractBlobStoreIOExceptionprotected boolean isMarkEnabled()
isMarkEnabled in class AbstractBlobStoreprotected void mark(AbstractBlobStore.BlockId id)
mark in class AbstractBlobStorepublic int sweep()
GarbageCollectableBlobStore
sweep in interface GarbageCollectableBlobStoresweep in class AbstractBlobStore
public boolean deleteChunks(List<String> chunkIds,
long maxLastModifiedTime)
throws Exception
chunkIds - the chunk idsmaxLastModifiedTime - the max last modified time to consider for retrieval
Exception - the exception
public Iterator<String> getAllChunkIds(long maxLastModifiedTime)
throws Exception
maxLastModifiedTime - the max last modified time to consider for retrieval
Exception - the exceptionpublic void clearCache()
GarbageCollectableBlobStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||