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 Details

  • Constructor Details

    • ConditionalUpdates

      public ConditionalUpdates()
  • Method Details

    • 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.