org.apache.ignite.internal.processors.cache.persistence.evict

## 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 and Description
`FairFifoPageEvictionTracker(PageMemoryNoStoreImpl pageMem, DataRegionConfiguration plcCfg, GridCacheSharedContext sharedCtx)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected boolean` `checkTouch(long pageId)`
`void` `evictDataPage()` Evicts one data page.
`void` `forgetPage(long pageId)` Call this method when last entry is removed from data page.
`void` `start()` Starts grid component, called on grid start.
`void` `stop()` Stops grid component, called on grid shutdown.
`void` `touchPage(long pageId)` Call this method when data page is accessed.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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 IgniteException

Starts grid component, called on grid start.

Throws:
  `IgniteException` - If failed.

#### stop

    public void stop()
              throws IgniteException

Stops grid component, called on grid shutdown.

Throws:
  `IgniteException` - If failed.

#### touchPage

    public void touchPage(long pageId)
                   throws IgniteCheckedException

Call this method when data page is accessed.

Parameters:
  `pageId` - Page id.
Throws:
  `IgniteCheckedException` - In case of page memory error.

#### evictDataPage

    public void evictDataPage()
                       throws IgniteCheckedException

Evicts 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 IgniteCheckedException

Call 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:
  `checkTouch` in class `PageAbstractEvictionTracker`
Parameters:
  `pageId` - Page ID.
Returns:
  true if page was touched at least once.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.0
Release Date | : November 30 2018