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, TMP
DEFAULT_DEPTH, DEFAULT_DIGEST, MAX_BUF_SIZE, MIN_BUF_SIZE
Constructor and Description |
---|
DefaultBinaryManager() |
Modifier and Type | Method and Description |
---|---|
Binary |
getBinary(Blob blob)
Saves the given blob into a
Binary . |
close, getBinary, getFileForDigest, getStorageDir, initialize, touch
getGarbageCollector, toHexString
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
Copyright © 2015 Nuxeo SA. All rights reserved.