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` `GridCacheAdapter.CacheExpiryPolicy()`

### Method Summary

Methods
`Map<KeyCacheObject,GridCacheVersion>` `entries()`
`static GridCacheAdapter.CacheExpiryPolicy` `forAccess(long ttl)`
`long` `forCreate()`
`long` `forUpdate()`
`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, 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`

### Constructor Detail

#### GridCacheAdapter.CacheExpiryPolicy

    protected GridCacheAdapter.CacheExpiryPolicy()

### Method Detail

#### forAccess

    @Nullable
    public static GridCacheAdapter.CacheExpiryPolicy forAccess(long ttl)

Parameters:
  `ttl` - Access TTL.
Returns:
  Access expire policy.

#### forCreate

    public long forCreate()

Specified by:
  `forCreate` in interface `IgniteCacheExpiryPolicy`
Returns:
  TTL.

#### forUpdate

    public long forUpdate()

Specified by:
  `forUpdate` in interface `IgniteCacheExpiryPolicy`
Returns:
  TTL.

#### reset

    public void reset()

Clears information about updated entries.

Specified by:
  `reset` in interface `IgniteCacheExpiryPolicy`

#### ttlUpdated

    public void ttlUpdated(KeyCacheObject key,
                  GridCacheVersion ver,
                  @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 Map<KeyCacheObject,GridCacheVersion> entries()

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

#### readers

    @Nullable
    public 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`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.2.0-incubating
Release Date | : June 16 2015