org.jboss.cache.eviction
Class FIFOConfiguration

java.lang.Object
  extended by org.jboss.cache.eviction.FIFOConfiguration
All Implemented Interfaces:
EvictionConfiguration

public class FIFOConfiguration
extends java.lang.Object
implements EvictionConfiguration

FIFO Configuration for FIFO Eviction Policy.

Version:
$Revision: 1.3 $
Author:
Daniel Huang (dhuang@jboss.org)

Field Summary
 
Fields inherited from interface org.jboss.cache.eviction.EvictionConfiguration
ATTR, ELEMENT_GRANULARITY, MAX_AGE_SECONDS, MAX_ELEMENTS_PER_NODE, MAX_NODES, MIN_ELEMENTS, MIN_NODES, NAME, NODE_GRANULARITY, REGION, REGION_POLICY_CLASS, TIME_TO_IDLE_SECONDS, TIME_TO_LIVE_SECONDS, WAKEUP_DEFAULT, WAKEUP_INTERVAL_SECONDS
 
Constructor Summary
FIFOConfiguration()
           
 
Method Summary
 int getMaxNodes()
          Get the maximum number of nodes or elements configured for the FIFOPolicy.
 void parseXMLConfig(org.w3c.dom.Element element)
          Configure the FIFOPolicy using XML.
 void setMaxNodes(int maxNodes)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FIFOConfiguration

public FIFOConfiguration()
Method Detail

getMaxNodes

public int getMaxNodes()
Get the maximum number of nodes or elements configured for the FIFOPolicy.

Returns:
maxNodes

setMaxNodes

public void setMaxNodes(int maxNodes)

parseXMLConfig

public void parseXMLConfig(org.w3c.dom.Element element)
                    throws ConfigureException
Configure the FIFOPolicy using XML.

This method expects a DOM object in the following format specific to FIFO:

1000

FIFO requires a "maxNodes" attribute otherwise a ConfigureException is thrown.

Specified by:
parseXMLConfig in interface EvictionConfiguration
Parameters:
element - XML DOM element containing the proper FIFO configuration XML.
Throws:
ConfigureException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright 1998-2005 JBoss Inc . All Rights Reserved.