org.apache.ignite.internal.processors.cache

## Class GridCacheAdapter.CacheExpiryPolicy

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.GridCacheAdapter.CacheExpiryPolicy

All Implemented Interfaces:
  IgniteCacheExpiryPolicy

Enclosing class:
  GridCacheAdapter<K,V>

    protected abstract static class GridCacheAdapter.CacheExpiryPolicy
    extends Object
    implements IgniteCacheExpiryPolicy

### Constructor Summary

Constructors
`protected` `CacheExpiryPolicy()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`@Nullable Map<KeyCacheObject,GridCacheVersion>` `entries()`
`static @Nullable GridCacheAdapter.CacheExpiryPolicy` `fromRemote(long createTtl, long accessTtl)`
`@Nullable Map<UUID,Collection<IgniteBiTuple<KeyCacheObject,GridCacheVersion>>>` `readers()`
`boolean` `readyToFlush(int cnt)`
`void` `reset()` Clears information about updated entries.
`String` `toString()`
`void` `ttlUpdated(KeyCacheObject key, GridCacheVersion ver, @Nullable Collection<UUID> rdrs)` Callback for ttl update on entry access.

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

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

### Methods inherited from interface org.apache.ignite.internal.processors.cache.IgniteCacheExpiryPolicy

`forAccess, forCreate, forUpdate`

### Constructor Detail

#### CacheExpiryPolicy

    protected CacheExpiryPolicy()

### Method Detail

#### fromRemote

    @Nullable
    public static @Nullable GridCacheAdapter.CacheExpiryPolicy fromRemote(long createTtl,
                                                                                    long accessTtl)

Parameters:
  `createTtl` - Create TTL.
  `accessTtl` - Access TTL.
Returns:
  Access expire policy.

#### reset

    public void reset()

Clears information about updated entries.

Specified by:
  `reset` in interface `IgniteCacheExpiryPolicy`

#### ttlUpdated

    public void ttlUpdated(KeyCacheObject key,
                           GridCacheVersion ver,
                           @Nullable
                           @Nullable Collection<UUID> rdrs)

Description copied from interface: `IgniteCacheExpiryPolicy`
Callback for ttl update on entry access.

Specified by:
  `ttlUpdated` in interface `IgniteCacheExpiryPolicy`
Parameters:
  `key` - Entry key.
  `ver` - Entry version.
  `rdrs` - Entry readers.

#### entries

    @Nullable
    public @Nullable Map<KeyCacheObject,GridCacheVersion> entries()

Specified by:
  `entries` in interface `IgniteCacheExpiryPolicy`
Returns:
  TTL update request.

#### readers

    @Nullable
    public @Nullable Map<UUID,Collection<IgniteBiTuple<KeyCacheObject,GridCacheVersion>>> readers()

Specified by:
  `readers` in interface `IgniteCacheExpiryPolicy`
Returns:
  Readers for updated entries.

#### readyToFlush

    public boolean readyToFlush(int cnt)

Specified by:
  `readyToFlush` in interface `IgniteCacheExpiryPolicy`
Parameters:
  `cnt` - Entries count.
Returns:
  `True` if number of entries or readers is greater than given number.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020