Class RDBBlobStore
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
-
- org.apache.jackrabbit.oak.plugins.blob.CachingBlobStore
-
- org.apache.jackrabbit.oak.plugins.document.rdb.RDBBlobStore
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,org.apache.jackrabbit.oak.commons.cache.Cache.Backend<org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId,org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.Data>,org.apache.jackrabbit.oak.spi.blob.BlobStore,org.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore
public class RDBBlobStore extends org.apache.jackrabbit.oak.plugins.blob.CachingBlobStore implements java.io.Closeable
-
-
Field Summary
Fields Modifier and Type Field Description protected RDBConnectionHandlerchprotected static intIDSIZEprotected java.lang.StringtnDataprotected java.lang.StringtnMeta
-
Constructor Summary
Constructors Constructor Description RDBBlobStore(@NotNull javax.sql.DataSource ds)Creates a RDBBlobStore instance using the providedDataSourceusing defaultDocumentNodeStoreBuilderandRDBOptions.RDBBlobStore(@NotNull javax.sql.DataSource ds, @Nullable DocumentNodeStoreBuilder<?> builder, @Nullable RDBOptions options)Creates a RDBBlobStore instance using the providedDataSourceusing the givenDocumentNodeStoreBuilderandRDBOptions.RDBBlobStore(@NotNull javax.sql.DataSource ds, @Nullable RDBOptions options)Creates a RDBBlobStore instance using the providedDataSourceusing defaultDocumentNodeStoreBuilderand the givenRDBOptions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()longcountDeleteChunks(java.util.List<java.lang.String> chunkIds, long maxLastModifiedTime)protected voidfinalize()java.util.Iterator<java.lang.String>getAllChunkIds(long maxLastModifiedTime)protected booleanisMarkEnabled()protected voidmark(org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId blockId)protected byte[]readBlockFromBackend(byte[] digest)protected byte[]readBlockFromBackend(org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId blockId)voidstartMark()protected voidstoreBlock(byte[] digest, int level, byte[] data)intsweep()-
Methods inherited from class org.apache.jackrabbit.oak.plugins.blob.CachingBlobStore
clearCache, getBlobCacheSize, getCacheStats
-
Methods inherited from class org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
clearInUse, deleteChunks, getBlobId, getBlobLength, getBlockSize, getBlockSizeMin, getInputStream, getOrCreateReferenceKey, getReference, getStatsCollector, load, mark, markInUse, readBlob, resolveChunks, setBlockSize, setBlockSizeMin, setReferenceKey, setReferenceKeyEncoded, setReferenceKeyPlainText, setStatsCollector, usesBlobId, writeBlob, writeBlob, writeBlob
-
-
-
-
Field Detail
-
IDSIZE
protected static final int IDSIZE
-
ch
protected RDBConnectionHandler ch
-
tnData
protected java.lang.String tnData
-
tnMeta
protected java.lang.String tnMeta
-
-
Constructor Detail
-
RDBBlobStore
public RDBBlobStore(@NotNull @NotNull javax.sql.DataSource ds, @Nullable @Nullable DocumentNodeStoreBuilder<?> builder, @Nullable @Nullable RDBOptions options)Creates a RDBBlobStore instance using the providedDataSourceusing the givenDocumentNodeStoreBuilderandRDBOptions.
-
RDBBlobStore
public RDBBlobStore(@NotNull @NotNull javax.sql.DataSource ds, @Nullable @Nullable RDBOptions options)Creates a RDBBlobStore instance using the providedDataSourceusing defaultDocumentNodeStoreBuilderand the givenRDBOptions.
-
RDBBlobStore
public RDBBlobStore(@NotNull @NotNull javax.sql.DataSource ds)Creates a RDBBlobStore instance using the providedDataSourceusing defaultDocumentNodeStoreBuilderandRDBOptions.
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
storeBlock
protected void storeBlock(byte[] digest, int level, byte[] data) throws java.io.IOException- Specified by:
storeBlockin classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore- Throws:
java.io.IOException
-
readBlockFromBackend
protected byte[] readBlockFromBackend(byte[] digest) throws java.lang.Exception- Throws:
java.lang.Exception
-
readBlockFromBackend
protected byte[] readBlockFromBackend(org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId blockId) throws java.lang.Exception- Specified by:
readBlockFromBackendin classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore- Throws:
java.lang.Exception
-
startMark
public void startMark() throws java.io.IOException- Specified by:
startMarkin interfaceorg.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore- Specified by:
startMarkin classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore- Throws:
java.io.IOException
-
isMarkEnabled
protected boolean isMarkEnabled()
- Specified by:
isMarkEnabledin classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
-
mark
protected void mark(org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId blockId) throws java.lang.Exception- Specified by:
markin classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore- Throws:
java.lang.Exception
-
sweep
public int sweep() throws java.io.IOException- Specified by:
sweepin interfaceorg.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore- Specified by:
sweepin classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore- Throws:
java.io.IOException
-
countDeleteChunks
public long countDeleteChunks(java.util.List<java.lang.String> chunkIds, long maxLastModifiedTime) throws java.lang.Exception- Specified by:
countDeleteChunksin interfaceorg.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore- Throws:
java.lang.Exception
-
getAllChunkIds
public java.util.Iterator<java.lang.String> getAllChunkIds(long maxLastModifiedTime) throws java.lang.Exception- Specified by:
getAllChunkIdsin interfaceorg.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore- Throws:
java.lang.Exception
-
-