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 String
entryKey
static String
KEY_SUFFIX
static String
STORE_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 void
computeEntryKey()
static String
computeEntryKey(String id)
static boolean
containsBlobHolder(String key)
Returns true if aBlobHolder
is stored for the givenkey
.static BlobHolder
getBlobHolder(String key)
Returns aBlobHolder
representing the entry with the givenkey
in the transient store used by theTransientStoreWork
or null if the entry doesn't exist.String
getEntryKey()
protected static TransientStore
getStore()
boolean
isIdempotent()
Returns true if a work with a givenWork.getId()
should always produce the same result.static void
putBlobHolder(String key, BlobHolder bh)
Stores the givenBlobHolder
as an entry with the givenkey
in the transient store used by theTransientStoreWork
.protected void
putBlobHolder(BlobHolder bh)
static void
removeBlobHolder(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
-
-
Constructor Detail
-
TransientStoreWork
public TransientStoreWork()
-
TransientStoreWork
public TransientStoreWork(String id)
-
-
Method Detail
-
computeEntryKey
public static String computeEntryKey(String id)
- Since:
- 8.4
-
putBlobHolder
public static void putBlobHolder(String key, BlobHolder bh)
Stores the givenBlobHolder
as an entry with the givenkey
in the transient store used by theTransientStoreWork
.
-
getBlobHolder
public static BlobHolder getBlobHolder(String key)
Returns aBlobHolder
representing the entry with the givenkey
in the transient store used by theTransientStoreWork
or null if the entry doesn't exist.
-
containsBlobHolder
public static boolean containsBlobHolder(String key)
Returns true if aBlobHolder
is 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:Work
Returns 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.
-
-