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
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.since 11.1, useLocalBlobStoreConfigurationinsteadstatic final StringDeprecated.since 11.1, useLocalBlobStoreConfigurationinsteadstatic final StringDeprecated.since 11.1, useLocalBlobStoreConfigurationinsteadprotected FileDeprecated.static final StringDeprecated.since 11.1, useLocalBlobStoreConfigurationinsteadprotected FileDeprecated.static final PatternDeprecated.since 11.1, useLocalBlobStoreConfigurationinsteadFields 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_LENGTHFields inherited from interface org.nuxeo.ecm.core.blob.binary.BinaryManager
PROP_KEY, PROP_PATH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidatomicMove(File source, File dest) Deprecated.Does an atomic move of the tmp (or source) file to the final file.voidclose()Deprecated.Closes the binary manager and releases all resources and temporary objects held by it.protected voidDeprecated.protected BinarygetBinary(InputStream in) Deprecated.Creates a binary value from the given input stream.Deprecated.Returns aBinarycorresponding to the given digest.getFileForDigest(String digest, boolean createDir) Deprecated.Gets a file representing the storage for a given digest.Deprecated.voidinitialize(String blobProviderId, Map<String, String> properties) Deprecated.Initializes the binary manager.protected StringDeprecated.static voidDeprecated.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, useLocalBlobStoreConfigurationinstead -
DEFAULT_PATH
Deprecated.since 11.1, useLocalBlobStoreConfigurationinstead- See Also:
-
DATA
Deprecated.since 11.1, useLocalBlobStoreConfigurationinstead- See Also:
-
TMP
Deprecated.since 11.1, useLocalBlobStoreConfigurationinstead- See Also:
-
CONFIG_FILE
Deprecated.since 11.1, useLocalBlobStoreConfigurationinstead- See Also:
-
storageDir
Deprecated. -
tmpDir
Deprecated.
-
-
Constructor Details
-
LocalBinaryManager
public LocalBinaryManager()Deprecated.
-
-
Method Details
-
initialize
Deprecated.Description copied from interface:BinaryManagerInitializes the binary manager.- Specified by:
initializein interfaceBinaryManager- Overrides:
initializein classAbstractBinaryManager- Parameters:
blobProviderId- the blob provider id for this binary managerproperties- initialization properties- Throws:
IOException
-
close
public void close()Deprecated.Description copied from interface:BinaryManagerCloses the binary manager and releases all resources and temporary objects held by it. -
getStorageDir
Deprecated. -
getBinary
Deprecated.Description copied from class:AbstractBinaryManagerCreates a binary value from the given input stream.- Specified by:
getBinaryin classAbstractBinaryManager- Throws:
IOException
-
getBinary
Deprecated.Description copied from interface:BinaryManagerReturns aBinarycorresponding to the given digest.A
nullis returned if the digest could not be found.- Specified by:
getBinaryin interfaceBinaryManager- Specified by:
getBinaryin 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-trueif 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
-
LocalBlobProviderinstead