public class FullPageIdTable extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
capacity
Max size, in elements.
|
protected int |
maxSteps
Maximum number of steps to try before failing.
|
protected long |
valPtr
Pointer to the values array.
|
| Constructor and Description |
|---|
FullPageIdTable(long addr,
long len,
boolean clear) |
| Modifier and Type | Method and Description |
|---|---|
int |
capacity() |
void |
clear() |
long |
clearAt(int idx,
GridPredicate3<Integer,Long,Integer> pred,
long absent) |
int |
distanceFromIdeal(int cacheId,
long pageId,
int tag)
Gets distance from the ideal key location to the actual location if this entry is present in the table,
or returns negative distance that needed to be scanned to determine the absence of the mapping.
|
long |
get(int cacheId,
long pageId,
int tag,
long absent,
long outdated)
Gets value associated with the given key.
|
EvictCandidate |
getNearestAt(int idx,
long absent)
Find nearest value from specified position to the right.
|
void |
put(int cacheId,
long pageId,
long value,
int tag)
Associates the given key with the given value.
|
long |
refresh(int cacheId,
long pageId,
int tag)
Refresh outdated value.
|
void |
remove(int grpId,
long pageId,
int tag)
Removes key-value association for the given key.
|
static long |
requiredMemory(long elementCnt) |
int |
size() |
void |
visitAll(IgniteBiInClosure<FullPageId,Long> visitor)
Scans all the elements in this table.
|
protected int capacity
protected int maxSteps
protected long valPtr
public FullPageIdTable(long addr,
long len,
boolean clear)
addr - Base address.len - Allocated memory length.clear - If true, then memory is considered dirty and will be cleared. Otherwise,
map will assume that the given memory region is in valid state.public static long requiredMemory(long elementCnt)
public final int size()
public final int capacity()
public long get(int cacheId,
long pageId,
int tag,
long absent,
long outdated)
cacheId - Cache ID.pageId - Page ID.public long refresh(int cacheId,
long pageId,
int tag)
cacheId - Cache ID.pageId - Page ID.tag - Partition tag.public void put(int cacheId,
long pageId,
long value,
int tag)
cacheId - Cache IDpageId - Page ID.value - Value to set.public void remove(int grpId,
long pageId,
int tag)
grpId - Cache group ID.pageId - Page ID.public EvictCandidate getNearestAt(int idx, long absent)
idx - Index to start searching from.absent - Default value that will be returned if no values present.absent and -1 if no values found.public long clearAt(int idx,
GridPredicate3<Integer,Long,Integer> pred,
long absent)
idx - Index to clear value at.pred - Test predicate.absent - Value to return if the cell is empty.public int distanceFromIdeal(int cacheId,
long pageId,
int tag)
cacheId - Cache ID.pageId - Page ID.tag - Tag.public void visitAll(IgniteBiInClosure<FullPageId,Long> visitor)
visitor - Visitor.public void clear()
Follow @ApacheIgnite
Ignite Fabric : ver. 2.4.0 Release Date : March 5 2018