Class FairFifoPageEvictionTracker
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.evict.PageAbstractEvictionTracker
-
- org.apache.ignite.internal.processors.cache.persistence.evict.FairFifoPageEvictionTracker
-
- All Implemented Interfaces:
PageEvictionTracker,LifecycleAware
public class FairFifoPageEvictionTracker extends PageAbstractEvictionTracker
On-heap FIFO page eviction tracker. Only for test purposes.
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.cache.persistence.evict.PageAbstractEvictionTracker
pageMem, trackingSize
-
-
Constructor Summary
Constructors Constructor Description FairFifoPageEvictionTracker(PageMemoryNoStoreImpl pageMem, DataRegionConfiguration plcCfg, GridCacheSharedContext sharedCtx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckTouch(long pageId)voidevictDataPage()Evicts one data page.voidforgetPage(long pageId)Call this method when last entry is removed from data page.voidstart()Starts grid component, called on grid start.voidstop()Stops grid component, called on grid shutdown.voidtouchPage(long pageId)Call this method when data page is accessed.-
Methods inherited from class org.apache.ignite.internal.processors.cache.persistence.evict.PageAbstractEvictionTracker
evictionRequired
-
-
-
-
Constructor Detail
-
FairFifoPageEvictionTracker
public FairFifoPageEvictionTracker(PageMemoryNoStoreImpl pageMem, DataRegionConfiguration plcCfg, GridCacheSharedContext sharedCtx)
- Parameters:
pageMem- Page memory.plcCfg- Data region configuration.sharedCtx- Shared context.
-
-
Method Detail
-
start
public void start() throws IgniteExceptionStarts grid component, called on grid start.- Throws:
IgniteException- If failed.
-
stop
public void stop() throws IgniteExceptionStops grid component, called on grid shutdown.- Throws:
IgniteException- If failed.
-
touchPage
public void touchPage(long pageId) throws IgniteCheckedExceptionCall this method when data page is accessed.- Parameters:
pageId- Page id.- Throws:
IgniteCheckedException- In case of page memory error.
-
evictDataPage
public void evictDataPage() throws IgniteCheckedExceptionEvicts one data page. In most cases, all entries will be removed from the page. Method guarantees removing at least one entry from "evicted" data page. Removing all entries may be not possible, as some of them can be used by active transactions.- Throws:
IgniteCheckedException- In case of page memory error.
-
forgetPage
public void forgetPage(long pageId) throws IgniteCheckedExceptionCall this method when last entry is removed from data page.- Parameters:
pageId- Page id.- Throws:
IgniteCheckedException- In case of page memory error.
-
checkTouch
protected boolean checkTouch(long pageId)
- Specified by:
checkTouchin classPageAbstractEvictionTracker- Parameters:
pageId- Page ID.- Returns:
- true if page was touched at least once.
-
-