Class 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
    • Constructor Detail

      • ConditionalUpdates

        public ConditionalUpdates()
    • Method Detail

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