Class RDBBlobStore

    • Field Detail

      • IDSIZE

        protected static final int IDSIZE
      • tnData

        protected java.lang.String tnData
      • tnMeta

        protected java.lang.String tnMeta
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class AbstractBlobStore
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • storeBlock

        protected void storeBlock​(byte[] digest,
                                  int level,
                                  byte[] data)
                           throws java.io.IOException
        Description copied from class: AbstractBlobStore
        Store a block of data.
        Specified by:
        storeBlock in class AbstractBlobStore
        Parameters:
        digest - the content hash (32 bytes)
        level - 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 achieve
        data - the data to be stored (the number of bytes is at most the block size)
        Throws:
        java.io.IOException
      • readBlockFromBackend

        protected byte[] readBlockFromBackend​(byte[] digest)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • readBlockFromBackend

        protected byte[] readBlockFromBackend​(AbstractBlobStore.BlockId blockId)
                                       throws java.lang.Exception
        Description copied from class: AbstractBlobStore
        Load the block from the storage backend. Returns null if the block was not found.
        Specified by:
        readBlockFromBackend in class AbstractBlobStore
        Parameters:
        blockId - the block id
        Returns:
        the block data, or null
        Throws:
        java.lang.Exception
      • countDeleteChunks

        public long countDeleteChunks​(java.util.List<java.lang.String> chunkIds,
                                      long maxLastModifiedTime)
                               throws java.lang.Exception
        Description copied from interface: GarbageCollectableBlobStore
        Deletes the blobs with the given ids.
        Specified by:
        countDeleteChunks in interface GarbageCollectableBlobStore
        Parameters:
        chunkIds - the chunk ids
        maxLastModifiedTime - the max last modified time to consider for retrieval, with the special value '0' meaning no filtering by time
        Returns:
        long the count of successful deletions
        Throws:
        java.lang.Exception - the exception
      • getAllChunkIds

        public java.util.Iterator<java.lang.String> getAllChunkIds​(long maxLastModifiedTime)
                                                            throws java.lang.Exception
        Description copied from interface: GarbageCollectableBlobStore
        Gets all the identifiers.
        Specified by:
        getAllChunkIds in interface GarbageCollectableBlobStore
        Parameters:
        maxLastModifiedTime - the max last modified time to consider for retrieval, with the special value '0' meaning no filtering by time
        Returns:
        the identifiers
        Throws:
        java.lang.Exception - the exception