Class ExpiryPolicy
Default expiry policy implementation with all durations defined explicitly.
Inheritance
Implements
Namespace: Apache.Ignite.Core.Cache.Expiry
Assembly: Apache.Ignite.Core.dll
Syntax
public class ExpiryPolicy : object, IExpiryPolicy
Constructors
ExpiryPolicy(Nullable<TimeSpan>, Nullable<TimeSpan>, Nullable<TimeSpan>)
Constructor.
Declaration
public ExpiryPolicy(TimeSpan? create, TimeSpan? update, TimeSpan? access)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<TimeSpan> | create | Expiry for create. |
System.Nullable<TimeSpan> | update | Expiry for udpate. |
System.Nullable<TimeSpan> | access | Expiry for access. |
Methods
GetExpiryForAccess()
Gets expiry for access operation.
If TimeSpan.ZERO
is returned, cache entry is considered immediately expired.
If null
is returned, no change to previously understood expiry is performed.
Declaration
public TimeSpan? GetExpiryForAccess()
Returns
Type | Description |
---|---|
System.Nullable<TimeSpan> | Expiry for access operation. |
GetExpiryForCreate()
Gets expiry for create operation.
If TimeSpan.ZERO
is returned, cache entry is considered immediately expired
and will not be added to cache.
If null
is returned, no change to previously understood expiry is performed.
Declaration
public TimeSpan? GetExpiryForCreate()
Returns
Type | Description |
---|---|
System.Nullable<TimeSpan> | Expiry for create opeartion. |
GetExpiryForUpdate()
Gets expiry for update operation.
If TimeSpan.ZERO
is returned, cache entry is considered immediately expired.
If null
is returned, no change to previously understood expiry is performed.
Declaration
public TimeSpan? GetExpiryForUpdate()
Returns
Type | Description |
---|---|
System.Nullable<TimeSpan> | Expiry for update operation. |