org.apache.ignite.internal.processors.cache.distributed.dht.topology

## Class PartitionsEvictManager

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter
  - - org.apache.ignite.internal.processors.cache.distributed.dht.topology.PartitionsEvictManager

All Implemented Interfaces:
  GridCacheSharedManager

    public class PartitionsEvictManager
    extends GridCacheSharedManagerAdapter

Class that serves asynchronous part eviction process. Multiple partition from group can be evicted at the same time.

### Field Summary

Fields
`static String` `SHOW_EVICTION_PROGRESS_FREQ` Eviction progress frequency property name.

### Fields inherited from class org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter

`cctx, diagnosticLog, log`

### Constructor Summary

Constructors
Constructor and Description
`PartitionsEvictManager()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `cleanupRemovedGroup(int grpId)` Cleans up group eviction context when it's safe.
`IgniteInternalFuture<?>` `evictPartitionAsync(CacheGroupContext grp, GridDhtLocalPartition part, GridFutureAdapter<?> finishFut)` Adds partition to eviction queue and starts eviction process if permit available.
`void` `onCacheGroupStarted(CacheGroupContext grp)` Callback on cache group start.
`void` `onCacheGroupStopped(CacheGroupContext grp)` Stops eviction process for group.
`protected void` `onKernalStop0(boolean cancel)`
`protected void` `start0()`
`int` `total()`

### Methods inherited from class org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter

`context, isStopping, kernalStartInfo, kernalStopInfo, log, onDisconnected, onKernalStart, onKernalStart0, onKernalStop, onReconnected, printMemoryStats, start, startInfo, stop, stop0, stopInfo, toString`

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

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

### Field Detail

#### SHOW_EVICTION_PROGRESS_FREQ

    @SystemProperty(value="Eviction progress frequency in milliseconds",
                    type=java.lang.Long.class,
                    defaults="120000")
    public static final String SHOW_EVICTION_PROGRESS_FREQ

Eviction progress frequency property name.

See Also:
  Constant Field Values

### Constructor Detail

#### PartitionsEvictManager

    public PartitionsEvictManager()

### Method Detail

#### onCacheGroupStarted

    public void onCacheGroupStarted(CacheGroupContext grp)

Callback on cache group start.

Parameters:
  `grp` - Group.

#### onCacheGroupStopped

    public void onCacheGroupStopped(CacheGroupContext grp)

Stops eviction process for group. Method awaits last offered partition eviction.

Parameters:
  `grp` - Group context.

#### evictPartitionAsync

    public IgniteInternalFuture<?> evictPartitionAsync(CacheGroupContext grp,
                                                       GridDhtLocalPartition part,
                                                       GridFutureAdapter<?> finishFut)

Adds partition to eviction queue and starts eviction process if permit available.

Parameters:
  `grp` - Group context.
  `part` - Partition to evict.
  `finishFut` - Clearing finish future.

#### start0

    protected void start0()
                   throws IgniteCheckedException

Overrides:
  `start0` in class `GridCacheSharedManagerAdapter`
Throws:
  `IgniteCheckedException` - If failed.

#### onKernalStop0

    protected void onKernalStop0(boolean cancel)

Overrides:
  `onKernalStop0` in class `GridCacheSharedManagerAdapter`
Parameters:
  `cancel` - Cancel flag.

#### cleanupRemovedGroup

    public void cleanupRemovedGroup(int grpId)

Cleans up group eviction context when it's safe.

Parameters:
  `grpId` - Group id.

#### total

    public int total()

Returns:
  The number of executing + waiting in the queue tasks.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

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