public class SQLBinaryManager extends CachingBinaryManager
The BLOBs are cached locally on first access for efficiency.
Because the BLOB length can be accessed independently of the binary stream, it is also cached in a simple text file if accessed before the stream.
Modifier and Type | Class and Description |
---|---|
static class |
SQLBinaryManager.SQLBinaryGarbageCollector |
class |
SQLBinaryManager.SQLFileStorage |
Modifier and Type | Field and Description |
---|---|
static String |
CACHE_SIZE_PREFIX |
static String |
COL_BIN |
static String |
COL_ID |
static String |
COL_MARK |
static String |
DEFAULT_CACHE_SIZE |
static String |
DS_PREFIX |
static String |
TABLE_PREFIX |
fileCache
DEFAULT_DEPTH, DEFAULT_DIGEST, MAX_BUF_SIZE, MIN_BUF_SIZE
Constructor and Description |
---|
SQLBinaryManager() |
Modifier and Type | Method and Description |
---|---|
Binary |
getBinary(String digest)
Returns a
Binary corresponding to the given digest. |
void |
initialize(BinaryManagerDescriptor binaryManagerDescriptor)
Initializer.
|
close, getFile, getLength, initializeCache, initializeCache
getBinary, getGarbageCollector, toHexString
public static final String DS_PREFIX
public static final String TABLE_PREFIX
public static final String CACHE_SIZE_PREFIX
public static final String DEFAULT_CACHE_SIZE
public static final String COL_ID
public static final String COL_BIN
public static final String COL_MARK
public void initialize(BinaryManagerDescriptor binaryManagerDescriptor) throws IOException
BinaryManager
initialize
in interface BinaryManager
initialize
in class CachingBinaryManager
IOException
public 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
getBinary
in class CachingBinaryManager
digest
- the digest, or null
Copyright © 2015 Nuxeo SA. All rights reserved.