Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)


Class TimeToLiveCacheInvalidationPolicy

  extended by oracle.toplink.descriptors.invalidation.CacheInvalidationPolicy
      extended by oracle.toplink.descriptors.invalidation.TimeToLiveCacheInvalidationPolicy
All Implemented Interfaces:

public class TimeToLiveCacheInvalidationPolicy
extends CacheInvalidationPolicy

A CacheInvalidationPolicy which allows objects to live for a specific amount of time after they are read. A TimeToLiveCacheInvalidationPolicy is instantiated with a specific number of milliseconds. This represents how long after an object is read it will expire.

See Also:
CacheInvalidationPolicy, Serialized Form

Field Summary
Fields inherited from class oracle.toplink.descriptors.invalidation.CacheInvalidationPolicy
Constructor Summary
TimeToLiveCacheInvalidationPolicy(long timeToLive)
          Construct a TimeToLiveCacheInvalidationPolicy
Method Summary
 long getTimeToLive()
          return the time-to-live specified for this policy
 void setTimeToLive(long timeToLive)
          Set the time-to-live specified by this policy
Methods inherited from class oracle.toplink.descriptors.invalidation.CacheInvalidationPolicy
setShouldRefreshInvalidObjectsInUnitOfWork, setShouldUpdateReadTimeOnUpdate, shouldRefreshInvalidObjectsInUnitOfWork, shouldUpdateReadTimeOnUpdate
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public TimeToLiveCacheInvalidationPolicy(long timeToLive)
Construct a TimeToLiveCacheInvalidationPolicy

timeToLive - the number of milliseconds an object affected by this policy will live.
Method Detail


public long getTimeToLive()
return the time-to-live specified for this policy


public void setTimeToLive(long timeToLive)
Set the time-to-live specified by this policy

Copyright © 1998, 2010, Oracle. All Rights Reserved.