public interface LoadedPagesMap
| Modifier and Type | Interface and Description |
|---|---|
static interface |
LoadedPagesMap.KeyPredicate
Interface describing a predicate for Key (cache group ID, page ID).
|
| Modifier and Type | Method and Description |
|---|---|
int |
capacity() |
void |
forEach(BiConsumer<FullPageId,Long> act)
Scans all the elements in this table.
|
long |
get(int grpId,
long pageId,
int reqVer,
long absent,
long outdated)
Gets value associated with the given key.
|
ReplaceCandidate |
getNearestAt(int idxStart)
Find nearest presented value from specified position to the right.
|
void |
put(int grpId,
long pageId,
long val,
int ver)
Associates the given key with the given value.
|
long |
refresh(int grpId,
long pageId,
int ver)
Refresh outdated value.
|
boolean |
remove(int grpId,
long pageId)
Removes key-value association for the given key.
|
GridLongList |
removeIf(int startIdxToClear,
int endIdxToClear,
LoadedPagesMap.KeyPredicate keyPred)
Removes entities matching provided predicate at specified mapping range.
|
default GridLongList |
removeIf(LoadedPagesMap.KeyPredicate keyPred)
Removes entities matching provided predicate.
|
int |
size() |
long get(int grpId,
long pageId,
int reqVer,
long absent,
long outdated)
grpId - Cache Group ID. First part of the key.pageId - Page ID. Second part of the key.reqVer - Requested entry version, counter associated with value.absent - return if provided page is not presented in map.outdated - return if provided reqVer version is greater than value in map (was used for put).void put(int grpId,
long pageId,
long val,
int ver)
grpId - Cache Group ID. First part of the key.pageId - Page ID. Second part of the key.val - Value to set.ver - Version/counter associated with value, can be used to check if value is outdated.long refresh(int grpId,
long pageId,
int ver)
get(int, long, int, long, long) returned outdated return value.grpId - First part of the key. Cache Group ID.pageId - Second part of the key. Page ID.ver - Partition tag.IllegalArgumentException - if method is called for absent key or key with fresh version.boolean remove(int grpId,
long pageId)
grpId - First part of the key. Cache Group ID.pageId - Second part of the key. Page ID.True if value was actually found and removed.int capacity()
int size()
ReplaceCandidate getNearestAt(int idxStart)
idxStart - Index to start searching from. Bounded with capacity().null value that will
be returned if no values present.GridLongList removeIf(int startIdxToClear, int endIdxToClear, LoadedPagesMap.KeyPredicate keyPred)
startIdxToClear - Index to clear value at, inclusive. Bounded with capacity().endIdxToClear - Index to clear value at, inclusive. Bounded with capacity().keyPred - Test predicate for (cache group ID, page ID).default GridLongList removeIf(LoadedPagesMap.KeyPredicate keyPred)
keyPred - Test predicate for (cache group ID, page ID).void forEach(BiConsumer<FullPageId,Long> act)
act - Visitor/action to be applied to each not empty cell.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.1 Release Date : December 20 2021