Package org.nuxeo.ecm.core.blob.binary
Class LocalBinaryManager
java.lang.Object
org.nuxeo.ecm.core.blob.binary.AbstractBinaryManager
org.nuxeo.ecm.core.blob.binary.LocalBinaryManager
- All Implemented Interfaces:
BinaryManager
- Direct Known Subclasses:
AESBinaryManager
,DefaultBinaryManager
Deprecated.
A simple filesystem-based binary manager. It stores the binaries according to their digest (hash), which means that
no transactional behavior needs to be implemented.
A garbage collection is needed to purge unused binaries.
The format of the binaries directory is:
- data/ hierarchy with the actual binaries in subdirectories,
- tmp/ temporary storage during creation,
- config.xml a file containing the configuration used.
- Since:
- 5.6
- Author:
- Florent Guillaume
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Deprecated. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Deprecated.since 11.1, useLocalBlobStoreConfiguration
insteadstatic final String
Deprecated.since 11.1, useLocalBlobStoreConfiguration
insteadstatic final String
Deprecated.since 11.1, useLocalBlobStoreConfiguration
insteadprotected File
Deprecated.static final String
Deprecated.since 11.1, useLocalBlobStoreConfiguration
insteadprotected File
Deprecated.static final Pattern
Deprecated.since 11.1, useLocalBlobStoreConfiguration
insteadFields inherited from class org.nuxeo.ecm.core.blob.binary.AbstractBinaryManager
blobProviderId, DEFAULT_DEPTH, DEFAULT_DIGEST, descriptor, digestPattern, DIGESTS_BY_LENGTH, garbageCollector, MAX_BUF_SIZE, MD5_DIGEST, MD5_DIGEST_LENGTH, MIN_BUF_SIZE, properties, SHA1_DIGEST, SHA1_DIGEST_LENGTH, SHA256_DIGEST, SHA256_DIGEST_LENGTH
Fields inherited from interface org.nuxeo.ecm.core.blob.binary.BinaryManager
PROP_KEY, PROP_PATH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
atomicMove
(File source, File dest) Deprecated.Does an atomic move of the tmp (or source) file to the final file.void
close()
Deprecated.Closes the binary manager and releases all resources and temporary objects held by it.protected void
Deprecated.protected Binary
getBinary
(InputStream in) Deprecated.Creates a binary value from the given input stream.Deprecated.Returns aBinary
corresponding to the given digest.getFileForDigest
(String digest, boolean createDir) Deprecated.Gets a file representing the storage for a given digest.Deprecated.void
initialize
(String blobProviderId, Map<String, String> properties) Deprecated.Initializes the binary manager.protected String
Deprecated.static void
Deprecated.Sets the last modification date to now on a fileMethods inherited from class org.nuxeo.ecm.core.blob.binary.AbstractBinaryManager
computeDigestPattern, getBinary, getDefaultDigestAlgorithm, getDescriptor, getDigestAlgorithm, getGarbageCollector, isValidDigest, removeBinaries, setDescriptor, storeAndDigest, toHexString
-
Field Details
-
WINDOWS_ABSOLUTE_PATH
Deprecated.since 11.1, useLocalBlobStoreConfiguration
instead -
DEFAULT_PATH
Deprecated.since 11.1, useLocalBlobStoreConfiguration
instead- See Also:
-
DATA
Deprecated.since 11.1, useLocalBlobStoreConfiguration
instead- See Also:
-
TMP
Deprecated.since 11.1, useLocalBlobStoreConfiguration
instead- See Also:
-
CONFIG_FILE
Deprecated.since 11.1, useLocalBlobStoreConfiguration
instead- See Also:
-
storageDir
Deprecated. -
tmpDir
Deprecated.
-
-
Constructor Details
-
LocalBinaryManager
public LocalBinaryManager()Deprecated.
-
-
Method Details
-
initialize
Deprecated.Description copied from interface:BinaryManager
Initializes the binary manager.- Specified by:
initialize
in interfaceBinaryManager
- Overrides:
initialize
in classAbstractBinaryManager
- Parameters:
blobProviderId
- the blob provider id for this binary managerproperties
- initialization properties- Throws:
IOException
-
close
public void close()Deprecated.Description copied from interface:BinaryManager
Closes the binary manager and releases all resources and temporary objects held by it. -
getStorageDir
Deprecated. -
getBinary
Deprecated.Description copied from class:AbstractBinaryManager
Creates a binary value from the given input stream.- Specified by:
getBinary
in classAbstractBinaryManager
- Throws:
IOException
-
getBinary
Deprecated.Description copied from interface:BinaryManager
Returns aBinary
corresponding to the given digest.A
null
is returned if the digest could not be found.- Specified by:
getBinary
in interfaceBinaryManager
- Specified by:
getBinary
in classAbstractBinaryManager
- Parameters:
digest
- the digest, ornull
- Returns:
- the corresponding binary
-
getFileForDigest
Deprecated.Gets a file representing the storage for a given digest.- Parameters:
digest
- the digestcreateDir
-true
if the directory containing the file itself must be created- Returns:
- the file for this digest
-
storeAndDigest
Deprecated.- Throws:
IOException
-
atomicMove
Deprecated.Does an atomic move of the tmp (or source) file to the final file.Tries to work well with NFS mounts and different filesystems.
- Throws:
IOException
-
createGarbageCollector
protected void createGarbageCollector()Deprecated. -
touch
Deprecated.Sets the last modification date to now on a file- Parameters:
file
- the file
-
LocalBlobProvider
instead