Package org.nuxeo.ecm.core.blob
Class KeyStrategyManaged
- java.lang.Object
-
- org.nuxeo.ecm.core.blob.KeyStrategyManaged
-
- All Implemented Interfaces:
KeyStrategy
public class KeyStrategyManaged extends Object implements KeyStrategy
Represents trusted managed blob key computation with a fallbackKeyStrategy- Since:
- 11.2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.blob.KeyStrategy
KeyStrategy.WriteObserver
-
-
Field Summary
Fields Modifier and Type Field Description protected KeyStrategystrategy-
Fields inherited from interface org.nuxeo.ecm.core.blob.KeyStrategy
VER_SEP
-
-
Constructor Summary
Constructors Constructor Description KeyStrategyManaged(KeyStrategy strategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)BlobWriteContextgetBlobWriteContext(BlobContext blobContext)Gets the write context for the given blob.StringgetDigestFromKey(String key)Gets, if possible, a digest from the key.inthashCode()booleanuseDeDuplication()Checks whether this key strategy uses de-duplication.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.core.blob.KeyStrategy
isValidKey
-
-
-
-
Field Detail
-
strategy
protected final KeyStrategy strategy
-
-
Constructor Detail
-
KeyStrategyManaged
public KeyStrategyManaged(KeyStrategy strategy)
-
-
Method Detail
-
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
public String getDigestFromKey(String key)
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
-
getBlobWriteContext
public BlobWriteContext getBlobWriteContext(BlobContext blobContext)
Description copied from interface:KeyStrategyGets the write context for the given blob.- Specified by:
getBlobWriteContextin interfaceKeyStrategy
-
-