public class CachePartitionPartialCountersMap extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static CachePartitionPartialCountersMap |
EMPTY |
static IgniteProductVersion |
PARTIAL_COUNTERS_MAP_SINCE |
| Constructor and Description |
|---|
CachePartitionPartialCountersMap(int partsCnt) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int partId,
long initialUpdCntr,
long updCntr)
Adds partition counters for a partition with the given ID.
|
boolean |
contains(int partId) |
long |
initialUpdateCounterAt(int idx)
Gets initial update counter saved at the given index.
|
boolean |
isEmpty() |
int |
partitionAt(int idx)
Gets partition ID saved at the given index.
|
int |
partitionIndex(int partId) |
boolean |
remove(int partId)
Removes element.
|
int |
size() |
static Map<Integer,T2<Long,Long>> |
toCountersMap(CachePartitionPartialCountersMap cntrsMap) |
String |
toString() |
void |
trim()
Cuts the array sizes according to curIdx.
|
long |
updateCounterAt(int idx)
Gets update counter saved at the given index.
|
public static final IgniteProductVersion PARTIAL_COUNTERS_MAP_SINCE
public static final CachePartitionPartialCountersMap EMPTY
public CachePartitionPartialCountersMap(int partsCnt)
partsCnt - Total number of partitions will be stored in the partial map.public int size()
public boolean isEmpty()
True if map is empty.public void add(int partId,
long initialUpdCntr,
long updCntr)
partId - Partition ID to add.initialUpdCntr - Partition initial update counter.updCntr - Partition update counter.public boolean remove(int partId)
partId - Partition ID.True if element was actually removed.public void trim()
public int partitionIndex(int partId)
partId - Partition ID to search.public boolean contains(int partId)
partId - Partition ID.True if partition is present in map.public int partitionAt(int idx)
idx - Index to get value from.public long initialUpdateCounterAt(int idx)
idx - Index to get value from.public long updateCounterAt(int idx)
idx - Index to get value from.public static Map<Integer,T2<Long,Long>> toCountersMap(CachePartitionPartialCountersMap cntrsMap)
cntrsMap - Partial local counters map.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.0 Release Date : October 15 2020