Interface InMemoryNodeModel.TransactionInitializer

Enclosing class:
InMemoryNodeModel

private static interface InMemoryNodeModel.TransactionInitializer
An interface used internally for handling concurrent updates. An implementation has to populate the passed in ModelTransaction. The transaction is then executed, and an atomic update of the model's TreeData is attempted. If this fails - because another update came across -, the whole operation has to be tried anew.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Initializes the specified transaction for an update operation.
  • Method Details

    • initTransaction

      boolean initTransaction(ModelTransaction tx)
      Initializes the specified transaction for an update operation. The return value indicates whether the transaction should be executed. A result of false means that the update is to be aborted (maybe another update method was called).
      Parameters:
      tx - the transaction to be initialized
      Returns:
      a flag whether the update should continue