Package com.tangosol.net.partition
Interface VersionedPartitions
-
- All Known Implementing Classes:
DefaultVersionedPartitions
public interface VersionedPartitions extends Iterable<Long>
VersionedPartitions implementations provide a mapping from partition to version. This data structure is intended to be used to track versions forVersionAwareMapListenerallowing those implementations to return the last versions received when needed.- Since:
- 21.06
- Author:
- hr 2021.02.17
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceVersionedPartitions.Iterator<T>An Iterator for partitions being tracked by aVersionedPartitionsimplementation that allows retrieval of the next partition as aprimitive.static interfaceVersionedPartitions.VersionedIteratorAn Iterator for partitions being tracked by aVersionedPartitionsimplementation that allows retrieval of partition and version.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VersionedPartitions.Iterator<Integer>getPartitions()Return the partitions being tracked.longgetVersion(int iPartition)Return the version last received for the given partition.VersionedPartitions.VersionedIteratoriterator()Returns aVersionedPartitions.VersionedIteratorthat allows retrieval of the next element as aprimitive.-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
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.VersionedIteratorthat allows retrieval of the next element as aprimitive. Additionally the current partition can be returned viaVersionedPartitions.Iterator.getPartition().
-
-