Class CacheState
- java.lang.Object
-
- org.apache.ignite.internal.pagemem.wal.record.CacheState
-
public class CacheState extends Object
-
-
Constructor Summary
Constructors Constructor Description CacheState(int partsCnt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPartitionState(int partId, long size, long cntr)voidaddPartitionState(int partId, long size, long cntr, byte state)longcounterByPartition(int partId)Gets partition counter by partition ID.intpartitionByIndex(int idx)longpartitionCounterByIndex(int idx)longpartitionSizeByIndex(int idx)intsize()longsizeByPartition(int partId)Gets partition size by partition ID.bytestateByIndex(int idx)StringtoString()
-
-
-
Method Detail
-
addPartitionState
public void addPartitionState(int partId, long size, long cntr)- Parameters:
partId- Partition ID to add.size- Partition size.cntr- Partition counter.
-
addPartitionState
public void addPartitionState(int partId, long size, long cntr, byte state)- Parameters:
partId- Partition ID to add.size- Partition size.cntr- Partition counter.state- Partition state.
-
sizeByPartition
public long sizeByPartition(int partId)
Gets partition size by partition ID.- Parameters:
partId- Partition ID.- Returns:
- Partition size (will return
-1if partition is not present in the record).
-
counterByPartition
public long counterByPartition(int partId)
Gets partition counter by partition ID.- Parameters:
partId- Partition ID.- Returns:
- Partition update counter (will return
-1if partition is not present in the record).
-
partitionByIndex
public int partitionByIndex(int idx)
- Parameters:
idx- Index to get.- Returns:
- Partition ID.
-
stateByIndex
public byte stateByIndex(int idx)
- Parameters:
idx- Index to get.- Returns:
- State partition.
-
partitionSizeByIndex
public long partitionSizeByIndex(int idx)
- Parameters:
idx- Index to get.- Returns:
- Partition size by index.
-
partitionCounterByIndex
public long partitionCounterByIndex(int idx)
- Parameters:
idx- Index to get.- Returns:
- Partition size by index.
-
size
public int size()
- Returns:
- State size.
-
-