Package org.nuxeo.ecm.core.blob
Class KeyStrategyDigest
java.lang.Object
org.nuxeo.ecm.core.blob.KeyStrategyDigest
- All Implemented Interfaces:
KeyStrategy
Represents computation of blob keys based on a message digest.
- Since:
- 11.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWrite observer computing a digest.Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.blob.KeyStrategy
KeyStrategy.WriteObserver -
Field Summary
FieldsFields inherited from interface org.nuxeo.ecm.core.blob.KeyStrategy
VER_SEP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBlobWriteContext(BlobContext blobContext) Gets the write context for the given blob.getDigestFromKey(String key) Gets, if possible, a digest from the key.protected static PatterngetDigestPattern(String digestAlgorithm) inthashCode()booleanisValidDigest(String key) booleanisValidKey(String key) Does the given key have the expected pattern for this strategy.booleanChecks whether this key strategy uses de-duplication.
-
Field Details
-
digestAlgorithm
-
digestPattern
-
-
Constructor Details
-
KeyStrategyDigest
-
-
Method Details
-
useDeDuplication
public boolean useDeDuplication()Description copied from interface:KeyStrategyChecks whether this key strategy uses de-duplication. When de-duplication is used, two blobs with identical contents have identical keys.- Specified by:
useDeDuplicationin interfaceKeyStrategy
-
getDigestFromKey
Description copied from interface:KeyStrategyGets, if possible, a digest from the key. This is not possible if the key is not derived from a digest.- Specified by:
getDigestFromKeyin interfaceKeyStrategy- Parameters:
key- the key- Returns:
- a digest, or
null
-
isValidDigest
-
getDigestPattern
-
getBlobWriteContext
Description copied from interface:KeyStrategyGets the write context for the given blob.- Specified by:
getBlobWriteContextin interfaceKeyStrategy
-
equals
-
hashCode
public int hashCode() -
isValidKey
Description copied from interface:KeyStrategyDoes the given key have the expected pattern for this strategy.- Specified by:
isValidKeyin interfaceKeyStrategy
-