public class DbBlobStore extends AbstractBlobStore
AbstractBlobStore.BlockId, AbstractBlobStore.DataBLOCK_SIZE_LIMIT, HASH_ALGORITHM, inUse, TYPE_DATA, TYPE_HASH, TYPE_HASH_COMPRESSED| Constructor and Description |
|---|
DbBlobStore() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isMarkEnabled() |
protected void |
mark(AbstractBlobStore.BlockId blockId) |
protected byte[] |
readBlockFromBackend(AbstractBlobStore.BlockId blockId)
Load the block from the storage backend.
|
void |
setConnectionPool(org.h2.jdbcx.JdbcConnectionPool cp) |
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.
|
clearCache, clearInUse, getBlobLength, getBlockSize, getBlockSizeMin, load, mark, markInUse, readBlob, setBlockSize, setBlockSizeMin, usesBlobId, writeBlob, writeBlobpublic void setConnectionPool(org.h2.jdbcx.JdbcConnectionPool cp)
throws SQLException
SQLExceptionprotected void storeBlock(byte[] digest,
int level,
byte[] data)
throws IOException
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 storedIOExceptionprotected byte[] readBlockFromBackend(AbstractBlobStore.BlockId blockId) throws Exception
AbstractBlobStorereadBlockFromBackend in class AbstractBlobStoreblockId - the block idExceptionpublic void startMark()
throws IOException
GarbageCollectableBlobStorestartMark in interface GarbageCollectableBlobStorestartMark in class AbstractBlobStoreIOExceptionprotected boolean isMarkEnabled()
isMarkEnabled in class AbstractBlobStoreprotected void mark(AbstractBlobStore.BlockId blockId) throws Exception
mark in class AbstractBlobStoreExceptionpublic int sweep()
throws IOException
GarbageCollectableBlobStoresweep in interface GarbageCollectableBlobStoresweep in class AbstractBlobStoreIOExceptionCopyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.