Class TransientStoreWork
- java.lang.Object
-
- org.nuxeo.ecm.core.work.AbstractWork
-
- org.nuxeo.ecm.core.transientstore.work.TransientStoreWork
-
- All Implemented Interfaces:
Serializable,Work
- Direct Known Subclasses:
AbstractRenditionBuilderWork,BlobListZipWork,ConversionWork,CSVImporterWork,PermissionsPurgeWork
public abstract class TransientStoreWork extends AbstractWork
A work allowing to store a result in theTransientStore.- Since:
- 7.4
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.work.api.Work
Work.Progress, Work.State
-
-
Field Summary
Fields Modifier and Type Field Description protected StringentryKeystatic StringKEY_SUFFIXstatic StringSTORE_NAME-
Fields inherited from class org.nuxeo.ecm.core.work.AbstractWork
callerThread, completionTime, docId, docIds, FAILURE_EXCEPTION, FAILURE_MSG, GLOBAL_DLQ_COUNT_REGISTRY_NAME, id, isTree, loginContext, originatingUsername, progress, RANDOM, repositoryName, schedulePath, schedulingTime, session, startTime, state, status, suspended, suspending, traceContext, WORK_FAILED_EVENT, WORK_INSTANCE
-
-
Constructor Summary
Constructors Constructor Description TransientStoreWork()TransientStoreWork(String id)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcomputeEntryKey()static StringcomputeEntryKey(String id)static booleancontainsBlobHolder(String key)Returns true if aBlobHolderis stored for the givenkey.static BlobHoldergetBlobHolder(String key)Returns aBlobHolderrepresenting the entry with the givenkeyin the transient store used by theTransientStoreWorkor null if the entry doesn't exist.StringgetEntryKey()protected static TransientStoregetStore()booleanisIdempotent()Returns true if a work with a givenWork.getId()should always produce the same result.static voidputBlobHolder(String key, BlobHolder bh)Stores the givenBlobHolderas an entry with the givenkeyin the transient store used by theTransientStoreWork.protected voidputBlobHolder(BlobHolder bh)static voidremoveBlobHolder(String key)-
Methods inherited from class org.nuxeo.ecm.core.work.AbstractWork
appendWorkToDeadLetterQueue, buildWorkFailureEventProps, cleanUp, closeSession, commitOrRollbackTransaction, equals, getCategory, getCompletionTime, getDocument, getDocuments, getId, getOriginatingUsername, getPartitionKey, getProgress, getRetryCount, getSchedulePath, getSchedulingTime, getSpanFromContext, getStartTime, getStatus, getWorkInstanceState, hashCode, initSession, initSession, isDocumentTree, isSuspending, isWorkInstanceSuspended, newDocumentLocation, openSystemSession, openUserSession, run, runWorkWithTransaction, setCompletionTime, setDocument, setDocument, setDocuments, setOriginatingUsername, setProgress, setSchedulePath, setStartTime, setStatus, setWorkInstanceState, setWorkInstanceSuspending, startTransaction, suspended, toString, work, workFailed
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.core.work.api.Work
getTitle, isCoalescing, isGroupJoin, onGroupJoinCompletion
-
-
-
-
Field Detail
-
STORE_NAME
public static final String STORE_NAME
- See Also:
- Constant Field Values
-
KEY_SUFFIX
public static final String KEY_SUFFIX
- See Also:
- Constant Field Values
-
entryKey
protected String entryKey
-
-
Constructor Detail
-
TransientStoreWork
public TransientStoreWork()
-
TransientStoreWork
public TransientStoreWork(String id)
-
-
Method Detail
-
putBlobHolder
public static void putBlobHolder(String key, BlobHolder bh)
Stores the givenBlobHolderas an entry with the givenkeyin the transient store used by theTransientStoreWork.
-
getBlobHolder
public static BlobHolder getBlobHolder(String key)
Returns aBlobHolderrepresenting the entry with the givenkeyin the transient store used by theTransientStoreWorkor null if the entry doesn't exist.
-
containsBlobHolder
public static boolean containsBlobHolder(String key)
Returns true if aBlobHolderis stored for the givenkey.- Since:
- 8.3
-
removeBlobHolder
public static void removeBlobHolder(String key)
-
getStore
protected static TransientStore getStore()
-
computeEntryKey
protected void computeEntryKey()
-
putBlobHolder
protected void putBlobHolder(BlobHolder bh)
-
getEntryKey
public String getEntryKey()
-
isIdempotent
public boolean isIdempotent()
Description copied from interface:WorkReturns true if a work with a givenWork.getId()should always produce the same result. The WorkManager implementation can safely skip duplicate executions of idempotent work.
-
-