Class DefaultSplitBlobStore

    • Constructor Detail

      • DefaultSplitBlobStore

        public DefaultSplitBlobStore​(String repositoryDir,
                                     BlobStore oldBlobStore,
                                     BlobStore newBlobStore)
    • Method Detail

      • readBlob

        public int readBlob​(String blobId,
                            long pos,
                            byte[] buff,
                            int off,
                            int length)
                     throws IOException
        Description copied from interface: BlobStore
        Read a number of bytes from a blob.
        Specified by:
        readBlob in interface BlobStore
        Parameters:
        blobId - the blob id
        pos - the position within the blob
        buff - the target byte array
        off - the offset within the target array
        length - the number of bytes to read
        Returns:
        the number of bytes read
        Throws:
        IOException
      • getInputStream

        public InputStream getInputStream​(String blobId)
                                   throws IOException
        Description copied from interface: BlobStore
        Returns a new stream for given blobId. The streams returned from multiple calls to this method are byte wise equals. That is, subsequent calls to read return the same sequence of bytes as long as neither call throws an exception.
        Specified by:
        getInputStream in interface BlobStore
        Parameters:
        blobId - the blob id
        Returns:
        a new stream for given blobId
        Throws:
        IOException
      • getBlobId

        public String getBlobId​(String reference)
        Description copied from interface: BlobStore
        Returns the blobId that referred by the given binary reference. Returns null if the reference is invalid, for example if it points to a blob that does not exist.
        Specified by:
        getBlobId in interface BlobStore
        Parameters:
        reference - binary reference
        Returns:
        matching blobId, or null
      • getReference

        public String getReference​(String blobId)
        Description copied from interface: BlobStore
        Returns a secure reference to blob referred by blobid, or null if no such reference is available.
        Specified by:
        getReference in interface BlobStore
        Parameters:
        blobId - blobId referring the blob for which reference is required
        Returns:
        binary reference, or null