Package org.nuxeo.ecm.core.storage.dbs
Class DBSTransactionState.ConditionalUpdates
- java.lang.Object
-
- org.nuxeo.ecm.core.storage.dbs.DBSTransactionState.ConditionalUpdates
-
- Enclosing class:
- DBSTransactionState
public static class DBSTransactionState.ConditionalUpdates extends Object
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
Fields Modifier and Type Field Description protected List<Runnable>
callbacks
protected Map<String,Serializable>
conditions
protected Map<String,Serializable>
updates
-
Constructor Summary
Constructors Constructor Description ConditionalUpdates()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCallback(Runnable callback)
Adds a callback.void
finish()
To be called by the processor after each update.Map<String,Serializable>
getConditions()
Gets the conditions to use to match a change token.Map<String,Serializable>
getUpdates()
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 Detail
-
conditions
protected final Map<String,Serializable> conditions
-
updates
protected final Map<String,Serializable> updates
-
-
Method Detail
-
put
public void put(Map<String,Serializable> condition, Map<String,Serializable> update)
Puts condition and update.
-
addCallback
public void addCallback(Runnable callback)
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
public Map<String,Serializable> getConditions()
Gets the conditions to use to match a change token.
-
getUpdates
public Map<String,Serializable> 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.
-
-