public class DefaultBinaryManager extends LocalBinaryManager
A garbage collection is needed to purge unused binaries.
The format of the binaries directory is:
LocalBinaryManager.DefaultBinaryGarbageCollector
CONFIG_FILE, DATA, DEFAULT_PATH, storageDir, TMP, tmpDir, WINDOWS_ABSOLUTE_PATH
blobProviderId, DEFAULT_DEPTH, DEFAULT_DIGEST, descriptor, DIGESTS_BY_LENGTH, garbageCollector, MAX_BUF_SIZE, MD5_DIGEST, MD5_DIGEST_LENGTH, MIN_BUF_SIZE, SHA1_DIGEST, SHA1_DIGEST_LENGTH, SHA256_DIGEST, SHA256_DIGEST_LENGTH
PROP_KEY, PROP_PATH
Constructor and Description |
---|
DefaultBinaryManager() |
Modifier and Type | Method and Description |
---|---|
Binary |
getBinary(Blob blob)
Saves the given blob into a
Binary . |
protected String |
storeAndDigest(FileBlob blob)
Stores and digests a temporary FileBlob.
|
atomicMove, close, createGarbageCollector, getBinary, getBinary, getFileForDigest, getStorageDir, initialize, storeAndDigest, touch
getDefaultDigestAlgorithm, getDescriptor, getDigestAlgorithm, getGarbageCollector, removeBinaries, storeAndDigest, toHexString
public DefaultBinaryManager()
public Binary getBinary(Blob blob) throws IOException
BinaryManager
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.
getBinary
in interface BinaryManager
getBinary
in class AbstractBinaryManager
blob
- the blobIOException
protected String storeAndDigest(FileBlob blob) throws IOException
IOException
Copyright © 2016 Nuxeo SA. All rights reserved.