org.apache.ignite.internal.processors.cache

## Class GridCacheEvictionManager

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheManagerAdapter
  - - org.apache.ignite.internal.processors.cache.GridCacheEvictionManager

All Implemented Interfaces:
  GridCacheManager

    public class GridCacheEvictionManager
    extends GridCacheManagerAdapter

Cache eviction manager.

### Field Summary

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

`cctx, log`

### Constructor Summary

Constructors
Constructor and Description
`GridCacheEvictionManager()`

### Method Summary

Methods
`void` `batchEvict(Collection<?> keys, GridCacheVersion obsoleteVer)`
`boolean` `evict(GridCacheEntryEx entry, GridCacheVersion obsoleteVer, boolean explicit, CacheEntryPredicate[] filter)`
`int` `evictQueueSize()`
`boolean` `evictSyncOrNearSync()`
`protected void` `onKernalStart0()`
`protected void` `onKernalStop0(boolean cancel)`
`void` `printMemoryStats()` Prints memory statistics (sizes of internal data structures, etc.).
`void` `printStats()` Prints out eviction stats.
`void` `start0()`
`void` `touch(GridCacheEntryEx e, AffinityTopologyVersion topVer)`
`void` `touch(IgniteTxEntry txEntry, boolean loc)`
`void` `unwind()` Notifications.

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

`context, kernalStartInfo, kernalStopInfo, log, onDisconnected, onKernalStart, onKernalStop, start, startInfo, stop, stop0, stopInfo, toString`

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

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

### Constructor Detail

#### GridCacheEvictionManager

    public GridCacheEvictionManager()

### Method Detail

#### start0

    public void start0()
                throws IgniteCheckedException

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

#### onKernalStart0

    protected void onKernalStart0()
                           throws IgniteCheckedException

Overrides:
  `onKernalStart0` in class `GridCacheManagerAdapter`
Throws:
  `IgniteCheckedException` - If failed.

#### onKernalStop0

    protected void onKernalStop0(boolean cancel)

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

#### evictQueueSize

    public int evictQueueSize()

Returns:
  Current size of evict queue.

#### touch

    public void touch(IgniteTxEntry txEntry,
             boolean loc)

Parameters:
  `txEntry` - Transactional entry.

#### touch

    public void touch(GridCacheEntryEx e,
             AffinityTopologyVersion topVer)

Parameters:
  `e` - Entry for eviction policy notification.
  `topVer` - Topology version.

#### evictSyncOrNearSync

    public boolean evictSyncOrNearSync()

Returns:
  `True` if either evicts or near evicts are synchronized, `false` otherwise.

#### evict

    public boolean evict(@Nullable
                GridCacheEntryEx entry,
                @Nullable
                GridCacheVersion obsoleteVer,
                boolean explicit,
                @Nullable
                CacheEntryPredicate[] filter)
                  throws IgniteCheckedException

Parameters:
  `entry` - Entry to attempt to evict.
  `obsoleteVer` - Obsolete version.
  `filter` - Optional entry filter.
  `explicit` - `True` if evict is called explicitly, `false` if it's called from eviction policy.
Returns:
  `True` if entry was marked for eviction.
Throws:
  `IgniteCheckedException` - In case of error.

#### batchEvict

    public void batchEvict(Collection<?> keys,
                  @Nullable
                  GridCacheVersion obsoleteVer)
                    throws IgniteCheckedException

Parameters:
  `keys` - Keys to evict.
  `obsoleteVer` - Obsolete version.
Throws:
  `IgniteCheckedException` - In case of error.

#### unwind

    public void unwind()

Notifications.

#### printStats

    public void printStats()

Prints out eviction stats.

#### printMemoryStats

    public void printMemoryStats()

Prints memory statistics (sizes of internal data structures, etc.). NOTE: this method is for testing and profiling purposes only.

Specified by:
  `printMemoryStats` in interface `GridCacheManager`
Overrides:
  `printMemoryStats` in class `GridCacheManagerAdapter`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.6.0
Release Date | : May 18 2016