public interface BinaryManager
Modifier and Type | Field and Description |
---|---|
static String |
PROP_KEY
In the initialization properties, the property for a generic key.
|
static String |
PROP_PATH
In the initialization properties, the property for the store path.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the binary manager and releases all resources and temporary objects held by it.
|
Binary |
getBinary(Blob blob)
Saves the given blob into a
Binary . |
Binary |
getBinary(String digest)
Returns a
Binary corresponding to the given digest. |
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
|
static final String PROP_PATH
static final String PROP_KEY
void initialize(String blobProviderId, Map<String,String> properties) throws IOException
blobProviderId
- the blob provider id for this binary managerproperties
- initialization propertiesIOException
Binary getBinary(Blob blob) throws IOException
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.
blob
- the blobIOException
Binary getBinary(String digest)
Binary
corresponding to the given digest.
A null
is returned if the digest could not be found.
digest
- the digest, or null
void removeBinaries(Collection<String> digests)
digests
- a set of digests, must not be null
.BinaryGarbageCollector getGarbageCollector()
Several calls to this method will return the same GC, so that its status can be monitored using
BinaryGarbageCollector.isInProgress()
.
void close()
String getDigestAlgorithm()
Copyright © 2015 Nuxeo SA. All rights reserved.