Class PagesList.PagesCache
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.freelist.PagesList.PagesCache
-
-
Field Summary
Fields Modifier and Type Field Description static intDFLT_PAGES_LIST_CACHING_EMPTY_FLUSH_GC_THRESHOLDstatic intDFLT_PAGES_LIST_CACHING_MAX_CACHE_SIZEstatic intDFLT_PAGES_LIST_CACHING_STRIPES_COUNTstatic StringIGNITE_PAGES_LIST_CACHING_EMPTY_FLUSH_GC_THRESHOLDstatic StringIGNITE_PAGES_LIST_CACHING_MAX_CACHE_SIZEstatic StringIGNITE_PAGES_LIST_CACHING_STRIPES_COUNT
-
Constructor Summary
Constructors Constructor Description PagesCache(@Nullable AtomicLong pagesCacheLimit)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(long pageId)Add pageId to the tail of the list.GridLongListflush()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.
-
-
-
Field Detail
-
DFLT_PAGES_LIST_CACHING_MAX_CACHE_SIZE
public static final int DFLT_PAGES_LIST_CACHING_MAX_CACHE_SIZE
-
DFLT_PAGES_LIST_CACHING_STRIPES_COUNT
public static final int DFLT_PAGES_LIST_CACHING_STRIPES_COUNT
-
DFLT_PAGES_LIST_CACHING_EMPTY_FLUSH_GC_THRESHOLD
public static final int DFLT_PAGES_LIST_CACHING_EMPTY_FLUSH_GC_THRESHOLD
-
IGNITE_PAGES_LIST_CACHING_MAX_CACHE_SIZE
@SystemProperty(value="Pages cache maximum size", type=java.lang.Long.class, defaults="64") public static final String IGNITE_PAGES_LIST_CACHING_MAX_CACHE_SIZE
- See Also:
- Constant Field Values
-
IGNITE_PAGES_LIST_CACHING_STRIPES_COUNT
@SystemProperty(value="Stripes count. Must be power of 2", type=java.lang.Long.class, defaults="4") public static final String IGNITE_PAGES_LIST_CACHING_STRIPES_COUNT
- See Also:
- Constant Field Values
-
IGNITE_PAGES_LIST_CACHING_EMPTY_FLUSH_GC_THRESHOLD
@SystemProperty(value="The threshold of flush calls on empty caches to allow GC of stripes (the flush is triggered two times per checkpoint)", type=java.lang.Long.class, defaults="10") public static final String IGNITE_PAGES_LIST_CACHING_EMPTY_FLUSH_GC_THRESHOLD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PagesCache
public PagesCache(@Nullable @Nullable AtomicLong pagesCacheLimit)Default constructor.
-
-
Method Detail
-
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
public GridLongList 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.
-
-