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:
Closeable
,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 Closeable
-
-
Field Summary
Fields Modifier and Type Field Description protected RDBConnectionHandler
ch
protected static int
IDSIZE
protected String
tnData
protected String
tnMeta
-
Constructor Summary
Constructors Constructor Description RDBBlobStore(@NotNull DataSource ds)
Creates a RDBBlobStore instance using the providedDataSource
using defaultDocumentNodeStoreBuilder
andRDBOptions
.RDBBlobStore(@NotNull DataSource ds, @Nullable DocumentNodeStoreBuilder<?> builder, @Nullable RDBOptions options)
Creates a RDBBlobStore instance using the providedDataSource
using the givenDocumentNodeStoreBuilder
andRDBOptions
.RDBBlobStore(@NotNull DataSource ds, @Nullable RDBOptions options)
Creates a RDBBlobStore instance using the providedDataSource
using defaultDocumentNodeStoreBuilder
and the givenRDBOptions
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
long
countDeleteChunks(List<String> chunkIds, long maxLastModifiedTime)
protected void
finalize()
Iterator<String>
getAllChunkIds(long maxLastModifiedTime)
protected boolean
isMarkEnabled()
protected void
mark(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)
void
startMark()
protected void
storeBlock(byte[] digest, int level, byte[] data)
int
sweep()
-
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 String tnData
-
tnMeta
protected String tnMeta
-
-
Constructor Detail
-
RDBBlobStore
public RDBBlobStore(@NotNull @NotNull DataSource ds, @Nullable @Nullable DocumentNodeStoreBuilder<?> builder, @Nullable @Nullable RDBOptions options)
Creates a RDBBlobStore instance using the providedDataSource
using the givenDocumentNodeStoreBuilder
andRDBOptions
.
-
RDBBlobStore
public RDBBlobStore(@NotNull @NotNull DataSource ds, @Nullable @Nullable RDBOptions options)
Creates a RDBBlobStore instance using the providedDataSource
using defaultDocumentNodeStoreBuilder
and the givenRDBOptions
.
-
RDBBlobStore
public RDBBlobStore(@NotNull @NotNull DataSource ds)
Creates a RDBBlobStore instance using the providedDataSource
using defaultDocumentNodeStoreBuilder
andRDBOptions
.
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
-
finalize
protected void finalize() throws Throwable
-
storeBlock
protected void storeBlock(byte[] digest, int level, byte[] data) throws IOException
- Specified by:
storeBlock
in classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
- Throws:
IOException
-
readBlockFromBackend
protected byte[] readBlockFromBackend(byte[] digest) throws Exception
- Throws:
Exception
-
readBlockFromBackend
protected byte[] readBlockFromBackend(org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId blockId) throws Exception
- Specified by:
readBlockFromBackend
in classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
- Throws:
Exception
-
startMark
public void startMark() throws IOException
- Specified by:
startMark
in interfaceorg.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore
- Specified by:
startMark
in classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
- Throws:
IOException
-
isMarkEnabled
protected boolean isMarkEnabled()
- Specified by:
isMarkEnabled
in classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
-
mark
protected void mark(org.apache.jackrabbit.oak.spi.blob.AbstractBlobStore.BlockId blockId) throws Exception
- Specified by:
mark
in classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
- Throws:
Exception
-
sweep
public int sweep() throws IOException
- Specified by:
sweep
in interfaceorg.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore
- Specified by:
sweep
in classorg.apache.jackrabbit.oak.spi.blob.AbstractBlobStore
- Throws:
IOException
-
countDeleteChunks
public long countDeleteChunks(List<String> chunkIds, long maxLastModifiedTime) throws Exception
- Specified by:
countDeleteChunks
in interfaceorg.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore
- Throws:
Exception
-
-