org.jboss.cache.eviction
Class ExpirationAlgorithmConfig

java.lang.Object
  extended by org.jboss.cache.config.ConfigurationComponent
      extended by org.jboss.cache.eviction.EvictionAlgorithmConfigBase
          extended by org.jboss.cache.eviction.ExpirationAlgorithmConfig
All Implemented Interfaces:
Serializable, Cloneable, CloneableConfigurationComponent, EvictionAlgorithmConfig

public class ExpirationAlgorithmConfig
extends EvictionAlgorithmConfigBase

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.eviction.EvictionAlgorithmConfigBase
evictionAlgorithmClassName, maxNodes, minTimeToLive
 
Fields inherited from class org.jboss.cache.config.ConfigurationComponent
log
 
Constructor Summary
ExpirationAlgorithmConfig()
           
 
Method Summary
 ExpirationAlgorithmConfig clone()
           
 boolean equals(Object o)
           
 String getExpirationKeyName()
          Returns the expirationKeyName.
 long getTimeToLive()
           
 int hashCode()
           
 boolean isWarnNoExpirationKey()
          Returns true if the algorithm should warn if a expiration key is missing for a node.
 void reset()
          Resets the values to their defaults.
 void setExpirationKeyName(String expirationKeyName)
          Sets the expirationKeyName.
 void setTimeToLive(long timeToLive)
          Sets the time to live
 void setTimeToLive(long timeToLive, TimeUnit timeUnit)
           
 void setTimeToLiveSeconds(long time)
          Deprecated. 
 void setWarnNoExpirationKey(boolean warnNoExpirationKey)
          Sets if the algorithm should warn if a expiration key is missing for a node.
 String toString()
           
 
Methods inherited from class org.jboss.cache.eviction.EvictionAlgorithmConfigBase
getEvictionAlgorithmClassName, getMaxNodes, getMinTimeToLive, setMaxNodes, setMinTimeToLive, setMinTimeToLive, 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, 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

ExpirationAlgorithmConfig

public ExpirationAlgorithmConfig()
Method Detail

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.


isWarnNoExpirationKey

public boolean isWarnNoExpirationKey()
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.


getTimeToLive

public long getTimeToLive()
Returns:
time to live, in milliseconds

setTimeToLive

public void setTimeToLive(long timeToLive)
Sets the time to live

Parameters:
timeToLive - value in milliseconds

setTimeToLive

public void setTimeToLive(long timeToLive,
                          TimeUnit timeUnit)

setTimeToLiveSeconds

@Deprecated
public void setTimeToLiveSeconds(long time)
Deprecated. 


clone

public ExpirationAlgorithmConfig clone()
                                throws CloneNotSupportedException
Specified by:
clone in interface CloneableConfigurationComponent
Specified by:
clone in interface EvictionAlgorithmConfig
Overrides:
clone in class EvictionAlgorithmConfigBase
Returns:
a clone of the EvictionAlgorithmConfig.
Throws:
CloneNotSupportedException

equals

public boolean equals(Object o)
Overrides:
equals in class EvictionAlgorithmConfigBase

hashCode

public int hashCode()
Overrides:
hashCode in class EvictionAlgorithmConfigBase

reset

public void reset()
Description copied from interface: EvictionAlgorithmConfig
Resets the values to their defaults.

Specified by:
reset in interface EvictionAlgorithmConfig
Overrides:
reset in class EvictionAlgorithmConfigBase

toString

public String toString()
Overrides:
toString in class Object


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