org.jboss.cache.eviction
Class Region

java.lang.Object
  extended by org.jboss.cache.eviction.Region

public class Region
extends java.lang.Object

A region is a collection of tree cache nodes that share the same eviction policy configurations, e.g., maxNodes, etc. The region is specified via Fqn.

Version:
$Revision: 1.11 $
Author:
Ben Wang 2-2004, Daniel Huang (dhuang@jboss.org)

Field Summary
protected  int checkCapacityCount
           
protected  org.apache.commons.logging.Log log_
           
protected  EDU.oswego.cs.dl.util.concurrent.BoundedLinkedQueue nodeEventQueue_
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 EvictionConfiguration getEvictionConfiguration()
           
 EvictionPolicy getEvictionPolicy()
           
 java.lang.String getFqn()
          Returns the region as a string with a / at the end.
 Fqn getFqnObject()
          Returns the region as a Fqn object.
 int hashCode()
           
 int nodeEventQueueSize()
           
 void putNodeEvent(EvictedEventNode event)
           
 void putNodeEvent(Fqn fqn, int event)
           
 void resetEvictionQueues()
           
 void setAddedNode(Fqn fqn)
           
 void setEvictionConfiguration(EvictionConfiguration configuration)
           
 void setMaxNodes(int maxSize)
          Deprecated. DO NOT USE. THIS IS PROVIDED FOR EJB3 INTEGRATION WITH LEGACY JBCache 1.2 API
 void setRemovedNode(Fqn fqn)
           
 void setTimeToLiveSeconds(long timeToLive)
          Deprecated. DO NOT USE. THIS IS PROVIDED FOR EJB3 INTEGRATION WITH LEGACY JBCache 1.2 API
 void setVisitedNode(Fqn fqn)
           
 EvictedEventNode takeLastEventNode()
          Take the last node from node queue.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeEventQueue_

protected EDU.oswego.cs.dl.util.concurrent.BoundedLinkedQueue nodeEventQueue_

log_

protected org.apache.commons.logging.Log log_

checkCapacityCount

protected int checkCapacityCount
Method Detail

getEvictionConfiguration

public EvictionConfiguration getEvictionConfiguration()

setEvictionConfiguration

public void setEvictionConfiguration(EvictionConfiguration configuration)

getEvictionPolicy

public EvictionPolicy getEvictionPolicy()

getFqn

public java.lang.String getFqn()
Returns the region as a string with a / at the end.


getFqnObject

public Fqn getFqnObject()
Returns the region as a Fqn object.


setAddedNode

public void setAddedNode(Fqn fqn)

setRemovedNode

public void setRemovedNode(Fqn fqn)

setVisitedNode

public void setVisitedNode(Fqn fqn)

putNodeEvent

public void putNodeEvent(Fqn fqn,
                         int event)

putNodeEvent

public void putNodeEvent(EvictedEventNode event)

takeLastEventNode

public EvictedEventNode takeLastEventNode()
Take the last node from node queue. It will also remove it from the queue.

Returns:
The EvictedEventNode

nodeEventQueueSize

public int nodeEventQueueSize()

resetEvictionQueues

public void resetEvictionQueues()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

setTimeToLiveSeconds

public void setTimeToLiveSeconds(long timeToLive)
Deprecated. DO NOT USE. THIS IS PROVIDED FOR EJB3 INTEGRATION WITH LEGACY JBCache 1.2 API


setMaxNodes

public void setMaxNodes(int maxSize)
Deprecated. DO NOT USE. THIS IS PROVIDED FOR EJB3 INTEGRATION WITH LEGACY JBCache 1.2 API



Copyright © 1998-2005 JBoss Inc . All Rights Reserved.