IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid
Class TTLType

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

public class TTLType
extends Object
implements 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
 byte getId()
          Get the raw value of this TTLType.
 String toString()
          Returns a string representation of the TTLType.
static TTLType valueOf(byte id)
          Given the raw value of a TTLType, this method returns a TTLType object, or null if the raw value does not match an existing type.
 
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

valueOf

public static final TTLType valueOf(byte id)
Given the raw value of a TTLType, this method returns a TTLType object, or null if the raw value does not match an existing type. This method is used to deserialize this object.

Parameters:
id - the raw value of a TTLType
Returns:
the TTLType corresponding to the raw input value
Since:
WXS 8.6

getId

public byte getId()
Get the raw value of this TTLType. This method is used to serialize this object.

Returns:
the raw value of this TTLType.

toString

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

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

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

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