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 forVersionAwareMapListener
allowing 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 interface
VersionedPartitions.Iterator<T>
An Iterator for partitions being tracked by aVersionedPartitions
implementation that allows retrieval of the next partition as aprimitive
.static interface
VersionedPartitions.VersionedIterator
An Iterator for partitions being tracked by aVersionedPartitions
implementation 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.long
getVersion(int iPartition)
Return the version last received for the given partition.VersionedPartitions.VersionedIterator
iterator()
Returns aVersionedPartitions.VersionedIterator
that 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.VersionedIterator
that allows retrieval of the next element as aprimitive
. Additionally the current partition can be returned viaVersionedPartitions.Iterator.getPartition()
.
-
-