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

## Class RandomLruPageReplacementPolicy

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.persistence.pagemem.PageReplacementPolicy
  - - org.apache.ignite.internal.processors.cache.persistence.pagemem.RandomLruPageReplacementPolicy

    public class RandomLruPageReplacementPolicy
    extends PageReplacementPolicy

Random-LRU page replacement policy implementation.

See Also:
  `PageReplacementMode.RANDOM_LRU`

### Field Summary

Fields
`static int` `RANDOM_PAGES_EVICT_NUM` Number of random pages that will be picked for eviction.

### Fields inherited from class org.apache.ignite.internal.processors.cache.persistence.pagemem.PageReplacementPolicy

`seg`

### Constructor Summary

Constructors
`protected` `RandomLruPageReplacementPolicy(org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl.Segment seg)`

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `replace()` Finds page to replace.

### Methods inherited from class org.apache.ignite.internal.processors.cache.persistence.pagemem.PageReplacementPolicy

`onHit, onMiss, onRemove`

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

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

### Field Detail

#### RANDOM_PAGES_EVICT_NUM

    public static final int RANDOM_PAGES_EVICT_NUM

Number of random pages that will be picked for eviction.

See Also:
  Constant Field Values

### Constructor Detail

#### RandomLruPageReplacementPolicy

    protected RandomLruPageReplacementPolicy(org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl.Segment seg)

Parameters:
  `seg` - Page memory segment.

### Method Detail

#### replace

    public long replace()
                 throws IgniteCheckedException

Finds page to replace. Note: This method always invoked under segment write lock.

Specified by:
  `replace` in class `PageReplacementPolicy`
Returns:
  Relative pointer to page.
Throws:
  `IgniteCheckedException`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023