Package com.tangosol.net.partition
Interface VersionedPartitions
- All Known Implementing Classes:
DefaultVersionedPartitions
VersionedPartitions implementations provide a mapping from partition to version.
This data structure is intended to be used to track versions for
VersionAwareMapListener
allowing those implementations to return the last versions received when needed.- Since:
- 21.06
- Author:
- hr 2021.02.17
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
An Iterator for partitions being tracked by aVersionedPartitions
implementation that allows retrieval of the next partition as aprimitive
.static interface
An Iterator for partitions being tracked by aVersionedPartitions
implementation that allows retrieval of partition and version. -
Method Summary
Modifier and TypeMethodDescriptionReturn the partitions being tracked.long
getVersion
(int iPartition) Return the version last received for the given partition.iterator()
Returns aVersionedPartitions.VersionedIterator
that allows retrieval of the next element as aprimitive
.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
getPartitions
VersionedPartitions.Iterator<Integer> getPartitions()Return the partitions being tracked.- Returns:
- the partitions being tracked
-
getVersion
long getVersion(int iPartition) Return the version last received for the given partition.- Parameters:
iPartition
- the partition in question- Returns:
- the version last received for the given partition
-
iterator
VersionedPartitions.VersionedIterator iterator()Returns aVersionedPartitions.VersionedIterator
that allows retrieval of the next element as aprimitive
. Additionally the current partition can be returned viaVersionedPartitions.Iterator.getPartition()
.
-