Refactor ShardStats 15/114215/23
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 26 Oct 2024 10:21:22 +0000 (12:21 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 28 Oct 2024 16:31:04 +0000 (17:31 +0100)
commiteb9f36a085cfc99f6c4e13ce3e86774d2cc3e2fc
treeed59d99640249afaacb3ad5ab914736198af95c5
parent0d765ede30ddd1b36bf71ca4b79065ed30536962
Refactor ShardStats

We have two views here:
- ShardStatsMXBean, which is mostly read-only
- ShardStats, which is updatable

Separate the two, with ShardStats being really holder of counters etc.
This allows us to successfully wire Shard(DataTree) even then mocking.

Change-Id: Ie902a7cf8a9458285d4a9efeed3c6fe4659fb08a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DefaultShardStatsMXBean.java [new file with mode: 0644]
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardCommitCoordinator.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardStats.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/IntegrationTestKit.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardStatsTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionFailureTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTransactionTest.java