org.jboss.cache.eviction
Class ExpirationConfiguration

java.lang.Object
  extended by org.jboss.cache.config.ConfigurationComponent
      extended by org.jboss.cache.eviction.EvictionPolicyConfigBase
          extended by org.jboss.cache.eviction.ExpirationConfiguration
All Implemented Interfaces:
Serializable, Cloneable, EvictionPolicyConfig

public class ExpirationConfiguration
extends EvictionPolicyConfigBase

Configuration for indicating the Node key for setting a specific eviction time.

See Also:
Serialized Form

Field Summary
static String EXPIRATION_KEY
          Default key name for indicating expiration time.
 
Fields inherited from class org.jboss.cache.config.ConfigurationComponent
log
 
Constructor Summary
ExpirationConfiguration()
           
 
Method Summary
 ExpirationConfiguration clone()
           
 String getExpirationKeyName()
          Returns the expirationKeyName.
 int getTimeToLiveSeconds()
           
 boolean getWarnNoExpirationKey()
          Returns true if the algorithm should warn if a expiration key is missing for a node.
protected  void setEvictionPolicyClassName()
          This method should be overridden by subclass implementers to set the default policy class name for the subclass.
 void setExpirationKeyName(String expirationKeyName)
          Sets the expirationKeyName.
 void setTimeToLiveSeconds(int timeToLiveSeconds)
           
 void setWarnNoExpirationKey(boolean warnNoExpirationKey)
          Sets if the algorithm should warn if a expiration key is missing for a node.
 
Methods inherited from class org.jboss.cache.eviction.EvictionPolicyConfigBase
equals, getEvictionPolicyClass, getMaxNodes, getMinTimeToLiveSeconds, hashCode, reset, setEvictionPolicyClass, setMaxNodes, setMinTimeToLiveSeconds, validate
 
Methods inherited from class org.jboss.cache.config.ConfigurationComponent
addChildConfig, addChildConfigs, passCacheToChildConfig, removeChildConfig, removeChildConfigs, replaceChildConfig, replaceChildConfigs, setCache, testImmutability
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXPIRATION_KEY

public static final String EXPIRATION_KEY
Default key name for indicating expiration time.

See Also:
Constant Field Values
Constructor Detail

ExpirationConfiguration

public ExpirationConfiguration()
Method Detail

setEvictionPolicyClassName

protected void setEvictionPolicyClassName()
Description copied from class: EvictionPolicyConfigBase
This method should be overridden by subclass implementers to set the default policy class name for the subclass. This will be called when the implementation is constructed, but is also called in EvictionPolicyConfigBase.reset().

Specified by:
setEvictionPolicyClassName in class EvictionPolicyConfigBase

getExpirationKeyName

public String getExpirationKeyName()
Returns the expirationKeyName. This key should point to a java.lang.Long value in the Node data.


setExpirationKeyName

public void setExpirationKeyName(String expirationKeyName)
Sets the expirationKeyName.


getWarnNoExpirationKey

public boolean getWarnNoExpirationKey()
Returns true if the algorithm should warn if a expiration key is missing for a node.


setWarnNoExpirationKey

public void setWarnNoExpirationKey(boolean warnNoExpirationKey)
Sets if the algorithm should warn if a expiration key is missing for a node.


getTimeToLiveSeconds

public int getTimeToLiveSeconds()

setTimeToLiveSeconds

public void setTimeToLiveSeconds(int timeToLiveSeconds)

clone

public ExpirationConfiguration clone()
                              throws CloneNotSupportedException
Overrides:
clone in class ConfigurationComponent
Throws:
CloneNotSupportedException


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.