IBM WebSphere® DataPower® XC10 Appliance
Release 1.0 Client API Specification

com.ibm.websphere.objectgrid
Class TTLType

java.lang.Object
  extended by com.ibm.websphere.objectgrid.TTLType
All Implemented Interfaces:
java.io.Serializable

public class TTLType
extends java.lang.Object
implements java.io.Serializable

Every BackingMap in ObjectGrid has a built in timed based evictor that is referred to as "time to live" evictor or TTL evictor. Each BackingMap entry has an expiration time that determines how long the entry is allowed to live in the BackingMap. When the expiration time is reached, the TTL evictor causes the expired entry to be evicted from the BackingMap. This class is used to define the TTLType value constants that determine how the the expiration time is computed for a map entry.

Since:
WAS XD 6.0, XC10
See Also:
BackingMap.setTtlEvictorType(TTLType), Serialized Form

Field Summary
static TTLType CREATION_TIME
          A TTLType.CREATION_TIME indicates an entry expiration time is the sum of the creation time of the entry plus the "time to live" value.
static TTLType LAST_ACCESS_TIME
          A TTLType.LAST_ACCESS_TIME indicates an entry expiration time is the sum of the last access time of the entry plus the "time to live" value.
static TTLType LAST_UPDATE_TIME
          A TTLType.LAST_UPDATE_TIME indicates an entry expiration time is the sum of the last update time of the entry plus the "time to live" value.
static TTLType NONE
          A TTLType.NONE indicates an entry has no expiration time and is allowed to live in the BackingMap until the application explicitly removes or invalidates the entry or a user defined evictor evicts it.
 
Method Summary
 java.lang.String toString()
          Returns a string representation of the TTLType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final TTLType NONE
A TTLType.NONE indicates an entry has no expiration time and is allowed to live in the BackingMap until the application explicitly removes or invalidates the entry or a user defined evictor evicts it.


CREATION_TIME

public static final TTLType CREATION_TIME
A TTLType.CREATION_TIME indicates an entry expiration time is the sum of the creation time of the entry plus the "time to live" value. The "time to live" value is set using the BackingMap.setTimeToLive(int) method and is the same for every entry and can not be changed by the application by using the ObjectMap.setTimeToLive(int) method. It can only be set prior to ObjectGrid initialization by use of the BackingMap.setTimeToLive(int) method.

See Also:
BackingMap.setTimeToLive(int)

LAST_ACCESS_TIME

public static final TTLType LAST_ACCESS_TIME
A TTLType.LAST_ACCESS_TIME indicates an entry expiration time is the sum of the last access time of the entry plus the "time to live" value. By default, the time to live value is set using the BackingMap.setTimeToLive(int) method and the default can be overridden by the application by using the ObjectMap.setTimeToLive(int) method.

See Also:
BackingMap.setTimeToLive(int), ObjectMap.setTimeToLive(int)

LAST_UPDATE_TIME

public static final TTLType LAST_UPDATE_TIME
A TTLType.LAST_UPDATE_TIME indicates an entry expiration time is the sum of the last update time of the entry plus the "time to live" value. By default, the time to live value is set using the BackingMap.setTimeToLive(int) method and the default can be overridden by the application by using the ObjectMap.setTimeToLive(int) method. The difference between this TTLType and LAST_ACCESS_TIME is that fetch operations do not cause the entry expiration time to be updated.

Since:
7.1
See Also:
BackingMap.setTimeToLive(int), ObjectMap.setTimeToLive(int)
Method Detail

toString

public java.lang.String toString()
Returns a string representation of the TTLType.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the TTLType.

IBM WebSphere® DataPower® XC10 Appliance
Release 1.0 Client API Specification

© Copyright International Business Machines Corp 2005,2010. All rights reserved.