Package org.nuxeo.ecm.core.storage.dbs
Class DBSTransactionState.ConditionalUpdates
java.lang.Object
org.nuxeo.ecm.core.storage.dbs.DBSTransactionState.ConditionalUpdates
- Enclosing class:
- DBSTransactionState
Logic to get the conditions to use to match and update a change token.
This may be called several times for a single DBS document update, because the low-level storage may need several database updates for a single high-level update in some cases.
- Since:
- 9.1
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map<String,
Serializable> protected final Map<String,
Serializable> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCallback
(Runnable callback) Adds a callback.void
finish()
To be called by the processor after each update.Gets the conditions to use to match a change token.Gets the updates to make to write the updated change token.void
put
(Map<String, Serializable> condition, Map<String, Serializable> update) Puts condition and update.
-
Field Details
-
conditions
-
updates
-
callbacks
-
-
Constructor Details
-
ConditionalUpdates
public ConditionalUpdates()
-
-
Method Details
-
put
Puts condition and update. -
addCallback
Adds a callback.The callback is useful to 1. finish updating internal in-memory document state after an update is done, and 2. prepare a new condition/update if the conditional update is used again.
-
getConditions
Gets the conditions to use to match a change token. -
getUpdates
Gets the updates to make to write the updated change token. -
finish
public void finish()To be called by the processor after each update.
-