Package org.nuxeo.ecm.core.blob.binary
Interface BinaryManager
-
- All Known Implementing Classes:
AbstractBinaryManager
,AbstractCloudBinaryManager
,AESBinaryManager
,AzureBinaryManager
,AzureCDNBinaryManager
,CachingBinaryManager
,CloudFrontBinaryManager
,DefaultBinaryManager
,GoogleStorageBinaryManager
,GridFSBinaryManager
,LocalBinaryManager
,S3BinaryManager
public interface BinaryManager
A binary manager stores binaries according to their digest.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
Closes the binary manager and releases all resources and temporary objects held by it.Binary
getBinary(String digest)
Returns aBinary
corresponding to the given digest.Binary
getBinary(Blob blob)
Saves the given blob into aBinary
.String
getDigestAlgorithm()
Returns the digest algorithm used to store and digest binaries.BinaryGarbageCollector
getGarbageCollector()
Returns the Binary Garbage Collector that can be used for this binary manager.void
initialize(String blobProviderId, Map<String,String> properties)
Initializes the binary manager.void
removeBinaries(Collection<String> digests)
Remove definitively a set of binaries
-
-
-
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 managerproperties
- initialization properties- Throws:
IOException
- Since:
- 7.3
-
getBinary
Binary getBinary(Blob blob) throws IOException
Saves the given blob into aBinary
.Returns a
Binary
representing the stream. TheBinary
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 aBinary
corresponding to the given digest.A
null
is returned if the digest could not be found.- Parameters:
digest
- the digest, ornull
- Returns:
- the corresponding binary
-
removeBinaries
void removeBinaries(Collection<String> digests)
Remove definitively a set of binaries- Parameters:
digests
- a set of digests, must not benull
.- 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
-
-