org.apache.ignite.internal.processors.cache

## Class GridCacheTtlManager

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

All Implemented Interfaces:
  GridCacheManager

    public class GridCacheTtlManager
    extends GridCacheManagerAdapter

Eagerly removes expired entries from cache when `CacheConfiguration.isEagerTtl()` flag is set.

### Field Summary

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

`cctx, log, starting`

### Constructor Summary

Constructors
Constructor and Description
`GridCacheTtlManager()`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `eagerTtlEnabled()`
`void` `expire()` Expires entries by TTL.
`boolean` `expire(int amount)` Processes specified amount of expired entries.
`protected void` `onKernalStop0(boolean cancel)`
`long` `pendingSize()`
`void` `printMemoryStats()` Prints memory statistics (sizes of internal data structures, etc.).
`protected void` `start0()`

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

`context, kernalStartInfo, kernalStopInfo, log, onDisconnected, onKernalStart, onKernalStart0, 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

#### GridCacheTtlManager

    public GridCacheTtlManager()

### Method Detail

#### start0

    protected void start0()
                   throws IgniteCheckedException

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

#### eagerTtlEnabled

    public boolean eagerTtlEnabled()

Returns:
  `True` if eager ttl is enabled for cache.

#### onKernalStop0

    protected void onKernalStop0(boolean cancel)

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

#### pendingSize

    public long pendingSize()
                     throws IgniteCheckedException

Returns:
  The size of pending entries.
Throws:
  `IgniteCheckedException` - If failed.

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

#### expire

    public void expire()

Expires entries by TTL.

#### expire

    public boolean expire(int amount)

Processes specified amount of expired entries.

Parameters:
  `amount` - Limit of processed entries by single call, `-1` for no limit.
Returns:
  `True` if unprocessed expired entries remains.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.5
Release Date | : June 4 2019