站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 cluster API Documentation 英文版文档

DistributedTimedCachePolicy.TimedEntry (JBoss Cluster API) - JBoss 4.0.1 sp1 cluster API Documentation 英文版文档


org.jboss.ha.framework.server.util
Interface DistributedTimedCachePolicy.TimedEntry

All Superinterfaces:
Serializable
Enclosing interface:
DistributedTimedCachePolicy

public static interface DistributedTimedCachePolicy.TimedEntry
extends Serializable

The interface that cache entries support.


Method Summary
 void destroy()
          Notify the entry that it has been removed from the cache.
 Object getValue()
          Get the value component of the TimedEntry.
 void init(long now)
          Initializes an entry with the current cache time.
 boolean isCurrent(long now)
          Is the entry still valid basis the current time
 boolean refresh()
          Attempt to extend the entry lifetime by refreshing it.
 

Method Detail

init

public void init(long now)
Initializes an entry with the current cache time. This is called when the entry is first inserted into the cache so that entries do not have to know the absolute system time.


isCurrent

public boolean isCurrent(long now)
Is the entry still valid basis the current time

Returns:
true if the entry is within its lifetime, false if it is expired.

refresh

public boolean refresh()
Attempt to extend the entry lifetime by refreshing it.

Returns:
true if the entry was refreshed successfully, false otherwise.

destroy

public void destroy()
Notify the entry that it has been removed from the cache.


getValue

public Object getValue()
Get the value component of the TimedEntry. This may or may not be the TimedEntry implementation.



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.