Introduce InMemoryDataTreeModification.Noop 19/114919/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 8 Jan 2025 18:31:53 +0000 (19:31 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 15 Jan 2025 17:25:39 +0000 (18:25 +0100)
commit11be353f5357b801713cfd0f93d4d0e06ccf8169
tree819f1868c87f49d14603ca9ed7d7434cb2d6afae
parentbeee28151dac0f132fe61679591b9a456a4222ac
Introduce InMemoryDataTreeModification.Noop

The set of operations in a modification is defined as set when user
calls DataTreeModification.ready() and therefore we can check for
LogicalOperation.NONE before we complete the Open -> Ready transition.

This allows us to split out a singleton Noop state to represent a empty
modification and recognize it in newModification()/validate()/prepare()
so these run completely concurrently.

Since this is the second singleton State object, introduce
abstract SingletonState with a common toString().

JIRA: YANGTOOLS-1651
Change-Id: Ieb2700aa3673a5d305f618aae4cf8249e05d4133
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6f8c9a73fc968ba7d4dc706a07b5a8629ad23285)
data/yang-data-tree-ri/src/main/java/org/opendaylight/yangtools/yang/data/tree/impl/InMemoryDataTreeModification.java
data/yang-data-tree-ri/src/main/java/org/opendaylight/yangtools/yang/data/tree/impl/NoopDataTreeCandidate.java
data/yang-data-tree-ri/src/test/java/org/opendaylight/yangtools/yang/data/tree/impl/DataTreeTransactionTest.java
data/yang-data-tree-ri/src/test/java/org/opendaylight/yangtools/yang/data/tree/impl/InMemoryDataTreeModificationTest.java