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

LRUEnterpriseContextCachePolicy (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


org.jboss.ejb.plugins
Class LRUEnterpriseContextCachePolicy

java.lang.Object
  extended byorg.jboss.util.LRUCachePolicy
      extended byorg.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy
All Implemented Interfaces:
org.jboss.util.CachePolicy, Monitorable, XmlLoadable
Direct Known Subclasses:
LRUStatefulContextCachePolicy

public class LRUEnterpriseContextCachePolicy
extends org.jboss.util.LRUCachePolicy
implements XmlLoadable, Monitorable

Least Recently Used cache policy for EnterpriseContexts.

Version:
$Revision: 1.25 $
Author:
Simone Bordet, Bill Burke
See Also:
AbstractInstanceCache

Nested Class Summary
protected  class LRUEnterpriseContextCachePolicy.ContextLRUList
          Subclass that logs list activity events.
protected  class LRUEnterpriseContextCachePolicy.OveragerTask
          This TimerTask passivates cached beans that have not been called for a while.
protected  class LRUEnterpriseContextCachePolicy.ResizerTask
          This TimerTask resizes the cache capacity using the cache miss frequency algorithm, that is the more cache misses we have, the more the cache size is enlarged, and viceversa.
 
Nested classes inherited from class org.jboss.util.LRUCachePolicy
org.jboss.util.LRUCachePolicy.LRUCacheEntry, org.jboss.util.LRUCachePolicy.LRUList
 
Field Summary
protected static org.jboss.logging.Logger log
           
protected static Timer tasksTimer
           
 
Fields inherited from class org.jboss.util.LRUCachePolicy
m_list, m_map, m_maxCapacity, m_minCapacity
 
Constructor Summary
LRUEnterpriseContextCachePolicy(AbstractInstanceCache eic)
          Creates a LRU cache policy object given the instance cache that use this policy object.
 
Method Summary
protected  void ageOut(org.jboss.util.LRUCachePolicy.LRUCacheEntry entry)
           
protected  void cacheMiss()
           
protected  org.jboss.util.LRUCachePolicy.LRUList createList()
           
 void destroy()
           
 void importXml(Element element)
          Reads from the configuration the parameters for this cache policy, that are all optionals.
 void sample(Object s)
          Samples the status of the implementor object and register the status into the snapshot argument.
 void start()
           
 void stop()
           
 
Methods inherited from class org.jboss.util.LRUCachePolicy
create, createCacheEntry, flush, get, insert, peek, remove, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.jboss.logging.Logger log

tasksTimer

protected static Timer tasksTimer
Constructor Detail

LRUEnterpriseContextCachePolicy

public LRUEnterpriseContextCachePolicy(AbstractInstanceCache eic)
Creates a LRU cache policy object given the instance cache that use this policy object.

Method Detail

sample

public void sample(Object s)
Description copied from interface: Monitorable
Samples the status of the implementor object and register the status into the snapshot argument.

Specified by:
sample in interface Monitorable

start

public void start()
Specified by:
start in interface org.jboss.util.CachePolicy

stop

public void stop()
Specified by:
stop in interface org.jboss.util.CachePolicy

destroy

public void destroy()
Specified by:
destroy in interface org.jboss.util.CachePolicy

importXml

public void importXml(Element element)
               throws org.jboss.deployment.DeploymentException
Reads from the configuration the parameters for this cache policy, that are all optionals. FIXME 20010626 marcf: Simone seriously arent' all the options overkill? give it another 6 month . Remember you are exposing the guts of this to the end user, also provide defaults so that if an entry is not specified you can still work and it looks _much_ better in the configuration files.

Specified by:
importXml in interface XmlLoadable
Throws:
org.jboss.deployment.DeploymentException

createList

protected org.jboss.util.LRUCachePolicy.LRUList createList()

ageOut

protected void ageOut(org.jboss.util.LRUCachePolicy.LRUCacheEntry entry)

cacheMiss

protected void cacheMiss()


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