Class 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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore

        org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore.BlobId
      • Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.plugins.blob.SharedDataStore

        org.apache.jackrabbit.oak.plugins.blob.SharedDataStore.Type
    • Field Summary

      • Fields inherited from class org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore

        cache, DEFAULT_CACHE_SIZE, delegate, MEM_CACHE_NAME, stats
    • 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 interface org.apache.jackrabbit.oak.spi.blob.BlobStore
        Overrides:
        getReference in class org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore
      • getStream

        protected InputStream getStream​(String blobId)
                                 throws IOException
        Overrides:
        getStream in class org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreBlobStore
        Throws:
        IOException