|
||||||||||
| 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.FileBlobStore
public class FileBlobStore
A file blob store.
| 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 | |
|---|---|
FileBlobStore(String dir)
|
|
| Method Summary | |
|---|---|
void |
clearCache()
Clear the cache. |
boolean |
deleteChunks(List<String> chunkIds,
long maxLastModifiedTime)
Deletes the blobs with the given ids. |
Iterator<String> |
getAllChunkIds(long maxLastModifiedTime)
Gets all the identifiers. |
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. |
String |
writeBlob(String tempFilePath)
Write a blob from a temporary file. |
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileBlobStore(String dir)
| Method Detail |
|---|
public String writeBlob(String tempFilePath)
throws IOException
GarbageCollectableBlobStore
writeBlob in interface GarbageCollectableBlobStorewriteBlob in class AbstractBlobStoretempFilePath - the temporary file name
IOException
protected void storeBlock(byte[] digest,
int level,
byte[] data)
throws IOException
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
IOException
protected byte[] readBlockFromBackend(AbstractBlobStore.BlockId id)
throws IOException
AbstractBlobStore
readBlockFromBackend in class AbstractBlobStoreid - the block id
IOException
public void startMark()
throws IOException
GarbageCollectableBlobStore
startMark in interface GarbageCollectableBlobStorestartMark in class AbstractBlobStoreIOExceptionprotected boolean isMarkEnabled()
isMarkEnabled in class AbstractBlobStore
protected void mark(AbstractBlobStore.BlockId id)
throws IOException
mark in class AbstractBlobStoreIOException
public int sweep()
throws IOException
GarbageCollectableBlobStore
sweep in interface GarbageCollectableBlobStoresweep in class AbstractBlobStoreIOException
public boolean deleteChunks(List<String> chunkIds,
long maxLastModifiedTime)
throws Exception
GarbageCollectableBlobStore
chunkIds - the chunk idsmaxLastModifiedTime - the max last modified time to consider for retrieval
Exception - the exception
public Iterator<String> getAllChunkIds(long maxLastModifiedTime)
throws Exception
GarbageCollectableBlobStore
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 | |||||||||