Interface BinaryManager

    • Field Detail

      • PROP_PATH

        static final String PROP_PATH
        In the initialization properties, the property for the store path.
        See Also:
        Constant Field Values
      • PROP_KEY

        static final String PROP_KEY
        In the initialization properties, the property for a generic key.
        See Also:
        Constant Field Values
    • Method Detail

      • initialize

        void initialize​(String blobProviderId,
                        Map<String,​String> properties)
                 throws IOException
        Initializes the binary manager.
        Parameters:
        blobProviderId - the blob provider id for this binary manager
        properties - initialization properties
        Throws:
        IOException
        Since:
        7.3
      • getBinary

        Binary getBinary​(Blob blob)
                  throws IOException
        Saves the given blob into a Binary.

        Returns a Binary representing the stream. The Binary includes a digest that is a sufficient representation to persist it.

        If the blob is a temporary FileBlob, then the temporary file may be reused as the final storage location after being moved.

        Parameters:
        blob - the blob
        Returns:
        the corresponding binary
        Throws:
        IOException
        Since:
        7.2
      • getBinary

        Binary getBinary​(String digest)
        Returns a Binary corresponding to the given digest.

        A null is returned if the digest could not be found.

        Parameters:
        digest - the digest, or null
        Returns:
        the corresponding binary
      • removeBinaries

        void removeBinaries​(Collection<String> digests)
        Remove definitively a set of binaries
        Parameters:
        digests - a set of digests, must not be null.
        Since:
        7.10
      • getGarbageCollector

        BinaryGarbageCollector getGarbageCollector()
        Returns the Binary Garbage Collector that can be used for this binary manager.

        Several calls to this method will return the same GC, so that its status can be monitored using BinaryGarbageCollector.isInProgress().

        Returns:
        the binary GC
      • close

        void close()
        Closes the binary manager and releases all resources and temporary objects held by it.
      • getDigestAlgorithm

        String getDigestAlgorithm()
        Returns the digest algorithm used to store and digest binaries.
        Since:
        7.4