Class SafeDataStoreBlobStore
- java.lang.Object
-
- org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore
-
- org.apache.jackrabbit.oak.upgrade.cli.blob.SafeDataStoreBlobStore
-
- All Implemented Interfaces:
AutoCloseable
,DataStore
,org.apache.jackrabbit.oak.api.blob.BlobAccessProvider
,org.apache.jackrabbit.oak.plugins.blob.BlobTrackingStore
,org.apache.jackrabbit.oak.plugins.blob.datastore.TypedDataStore
,org.apache.jackrabbit.oak.plugins.blob.SharedDataStore
,org.apache.jackrabbit.oak.spi.blob.BlobStore
,org.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore
public class SafeDataStoreBlobStore extends org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore
This implementation of the DataStoreBlobStore won't throw an exception if it can't find blob with given id. The WARN message will be emitted instead and the empty InputStream will be returned.
-
-
Constructor Summary
Constructors Constructor Description SafeDataStoreBlobStore(DataStore delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DataRecord
getDataRecord(String blobId)
String
getReference(@NotNull String encodedBlobId)
protected InputStream
getStream(String blobId)
-
Methods inherited from class org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore
addMetadataRecord, addMetadataRecord, addRecord, addRecord, addTracker, clearCache, clearInUse, close, completeBlobUpload, countDeleteChunks, deleteAllMetadataRecords, deleteAllOlderThan, deleteChunks, deleteMetadataRecord, extractBlobId, getAllChunkIds, getAllIdentifiers, getAllMetadataRecords, getAllRecords, getBlobId, getBlobLength, getBlockSizeMin, getCacheStats, getDataStore, getDownloadURI, getInputStream, getMetadataRecord, getMinRecordLength, getRecord, getRecordForId, getRecordFromReference, getRecordIfStored, getTracker, getType, init, initiateBlobUpload, initiateBlobUpload, metadataRecordExists, readBlob, resolveChunks, setBlobStatsCollector, setBlockSize, setMaxCachedBinarySize, startMark, sweep, toString, updateModifiedDateOnAccess, writeBlob, writeBlob, writeBlob
-
-
-
-
Constructor Detail
-
SafeDataStoreBlobStore
public SafeDataStoreBlobStore(DataStore delegate)
-
-
Method Detail
-
getReference
public String getReference(@NotNull @NotNull String encodedBlobId)
- Specified by:
getReference
in interfaceorg.apache.jackrabbit.oak.spi.blob.BlobStore
- Overrides:
getReference
in classorg.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore
-
getStream
protected InputStream getStream(String blobId) throws IOException
- Overrides:
getStream
in classorg.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore
- Throws:
IOException
-
getDataRecord
protected DataRecord getDataRecord(String blobId) throws DataStoreException
- Overrides:
getDataRecord
in classorg.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore
- Throws:
DataStoreException
-
-