org.jboss.cache.eviction
Class RegionManager

java.lang.Object
  extended byorg.jboss.cache.eviction.RegionManager

public class RegionManager
extends java.lang.Object

Factory to create region from configuration, to track region, and to resolve naming conflict for regions. Note that in addition to user-specified regions, there is also a global cache _default_ region that covers everything else.


Field Summary
static int CAPACITY
           
 
Constructor Summary
RegionManager(EvictionPolicy (src)  policy)
           
 
Method Summary
 void checkConflict(java.lang.String myFqn)
          Check for conflict in the current regions.
 Region (src) createRegion(java.lang.String fqn, EvictionAlgorithm (src)  algorithm)
          Create a region based on fqn.
 Region (src) getRegion(java.lang.String myFqn)
           
 Region (src) [] getRegions()
           
 boolean hasRegion(java.lang.String myFqn)
           
 void removeRegion(java.lang.String fqn)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CAPACITY

public static final int CAPACITY
See Also:
Constant Field Values (src)
Constructor Detail

RegionManager

public RegionManager(EvictionPolicy (src)  policy)
Method Detail

createRegion

public Region (src)  createRegion(java.lang.String fqn,
                           EvictionAlgorithm (src)  algorithm)
                    throws RegionNameConflictException (src) 
Create a region based on fqn.

Parameters:
fqn - The region identifier.
algorithm - EvictionAlgorithm that associates with this region.
Throws:
RegionNameConflictException (src)

removeRegion

public void removeRegion(java.lang.String fqn)

hasRegion

public boolean hasRegion(java.lang.String myFqn)

getRegion

public Region (src)  getRegion(java.lang.String myFqn)

getRegions

public Region (src) [] getRegions()

checkConflict

public void checkConflict(java.lang.String myFqn)
                   throws RegionNameConflictException (src) 
Check for conflict in the current regions. There is a conflict

if fqn is any parent fqn of the current regions.

Parameters:
myFqn - Current fqn for potential new region.
Throws:
RegionNameConflictException (src) - to indicate a region name conflict has ocurred.