public abstract class AbstractBinaryManager extends Object implements BinaryManager
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_DEPTH |
static String |
DEFAULT_DIGEST |
static int |
MAX_BUF_SIZE |
static int |
MIN_BUF_SIZE |
Constructor and Description |
---|
AbstractBinaryManager() |
Modifier and Type | Method and Description |
---|---|
Binary |
getBinary(Blob blob)
Saves the given blob into a
Binary . |
abstract Binary |
getBinary(String digest)
Returns a
Binary corresponding to the given digest. |
BinaryGarbageCollector |
getGarbageCollector()
Returns the Binary Garbage Collector that can be used for this binary manager.
|
abstract void |
initialize(BinaryManagerDescriptor binaryManagerDescriptor)
Initializer.
|
static String |
toHexString(byte[] data) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public static final String DEFAULT_DIGEST
public static final int DEFAULT_DEPTH
public static final int MIN_BUF_SIZE
public static final int MAX_BUF_SIZE
public abstract void initialize(BinaryManagerDescriptor binaryManagerDescriptor) throws IOException
BinaryManager
initialize
in interface BinaryManager
IOException
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
blob
- the blobIOException
public abstract Binary getBinary(String digest)
BinaryManager
Binary
corresponding to the given digest.
A null
is returned if the digest could not be found.
getBinary
in interface BinaryManager
digest
- the digest, or null
public static String toHexString(byte[] data)
public BinaryGarbageCollector getGarbageCollector()
BinaryManager
Several calls to this method will return the same GC, so that its status can be monitored using
BinaryGarbageCollector.isInProgress()
.
getGarbageCollector
in interface BinaryManager
Copyright © 2015 Nuxeo SA. All rights reserved.