Class PagesList.PagesCache
java.lang.Object
org.apache.ignite.internal.persistence.freelist.PagesList.PagesCache
- Enclosing class:
- PagesList
Class to store page-list cache onheap.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(long pageId) Add pageId to the tail of the list.flush()Flush all stripes to one list and clear stripes.longpoll()Poll next page from the list.booleanremovePage(long pageId) Remove page from the list.intsize()Cache size.
-
Constructor Details
-
PagesCache
Default constructor.
-
-
Method Details
-
removePage
public boolean removePage(long pageId) Remove page from the list.- Parameters:
pageId- Page id.- Returns:
Trueif page was found and succesfully removed,falseif page not found.
-
poll
public long poll()Poll next page from the list.- Returns:
- pageId.
-
flush
Flush all stripes to one list and clear stripes. -
add
public boolean add(long pageId) Add pageId to the tail of the list.- Parameters:
pageId- Page id.- Returns:
Trueif page can be added,falseif list is full.
-
size
public int size()Cache size.
-