Add UnsignedLongBitmap 05/98405/1
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 6 Nov 2021 15:04:48 +0000 (16:04 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 11 Nov 2021 08:26:55 +0000 (09:26 +0100)
commit5982a49c0194b563c04d76ce97e07eca11a05ea9
treebc136f763d36deaf2dabf7d0b6cca979e9399d86
parent8d3df9ecd58c1081f750859fd1de354698a71b0e
Add UnsignedLongBitmap

Rather than using a ImmutableMap<UnsignedLong, Boolean>, we can do
have a much denser representation with a specialized class. Here we
are introducing an explicit UnsignedLongBitmap, which stores an array
of longs and an array of booleans, ditching the intermediate objects.

Also clean up error reporting, throwing an IOException instead of a
VerifyException when things should go south unexpectedly.

JIRA: CONTROLLER-2013
Change-Id: Ie64da0af68ea2898dc77368afd4fce8abd2cccea
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 3402cfce32b05957219e54754dd7ca5b0a54cd0e)
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendHistoryMetadataBuilder.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/persisted/FrontendHistoryMetadata.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/UnsignedLongBitmap.java [new file with mode: 0644]
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/persisted/FrontendShardDataTreeSnapshotMetadataTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/UnsignedLongBitmapTest.java [new file with mode: 0644]