Class Expiration
- java.lang.Object
-
- com.alachisoft.ncache.runtime.caching.expiration.Expiration
-
public class Expiration extends java.lang.Object
Class that provides values to specify expiration of items in cache.
-
-
Constructor Summary
Constructors Constructor Description Expiration()
Instantiates expiration to provide expiration values for items in cache.Expiration(ExpirationType expirationType)
Instantiates expiration to provide expiration values for items in cache.Expiration(ExpirationType expirationType, TimeSpan expireAfter)
Instantiates expiration to provide expiration values for items in cache.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExpirationType
getExpirationType()
The type of expiration to be used while expiring items in cache.TimeSpan
getExpireAfter()
Gets the value of time in the form ofTimeSpan
that shows after how much time, the item in cache is to be expired.void
setExpireAfter(TimeSpan value)
Sets the value of time in the form ofTimeSpan
that shows after how much time, the item in cache is to be expired.
-
-
-
Constructor Detail
-
Expiration
public Expiration()
Instantiates expiration to provide expiration values for items in cache.
-
Expiration
public Expiration(ExpirationType expirationType)
Instantiates expiration to provide expiration values for items in cache.- Parameters:
expirationType
- Enum indicating type of expiration to be used while expiring items in cache.
-
Expiration
public Expiration(ExpirationType expirationType, TimeSpan expireAfter)
Instantiates expiration to provide expiration values for items in cache.- Parameters:
expirationType
- Enum indicating type of expiration to be used while expiring items in cache.expireAfter
- Value of time in the form ofTimeSpan
that shows after how much time, the item in cache is to be expired.
-
-
Method Detail
-
getExpireAfter
public final TimeSpan getExpireAfter()
Gets the value of time in the form ofTimeSpan
that shows after how much time, the item in cache is to be expired.- Returns:
- The TimeSpan instance that indicates the time after which item will be expired from cache.
-
setExpireAfter
public final void setExpireAfter(TimeSpan value)
Sets the value of time in the form ofTimeSpan
that shows after how much time, the item in cache is to be expired.- Parameters:
value
- The TimeSpan instance that indicates the time after which item will be expired from cache.
-
getExpirationType
public final ExpirationType getExpirationType()
The type of expiration to be used while expiring items in cache. The value of this type varies from item to item in cache.- Returns:
- The expiration type of item in cache.
-
-