public class LRUAlgorithmConfig extends EvictionAlgorithmConfigBase
LRUAlgorithm.
evictionAlgorithmClassName, maxNodes, minTimeToLivelog| Constructor and Description |
|---|
LRUAlgorithmConfig() |
LRUAlgorithmConfig(long timeToLive,
long maxAge) |
LRUAlgorithmConfig(long timeToLive,
long maxAge,
int maxNodes) |
| Modifier and Type | Method and Description |
|---|---|
LRUAlgorithmConfig |
clone() |
boolean |
equals(Object o) |
long |
getMaxAge() |
long |
getTimeToLive() |
int |
hashCode() |
void |
reset()
Resets the values to their defaults.
|
void |
setMaxAge(long maxAge)
Sets the max age per element
|
void |
setMaxAge(long maxAge,
TimeUnit timeUnit) |
void |
setTimeToLive(long timeToLive)
Sets the time to live
|
void |
setTimeToLive(long timeToLive,
TimeUnit timeUnit) |
void |
setTimeToLiveSeconds(long time)
Deprecated.
|
String |
toString() |
void |
validate()
Requires a positive timeToLive value or ConfigurationException
is thrown.
|
getEvictionAlgorithmClassName, getMaxNodes, getMinTimeToLive, setMaxNodes, setMinTimeToLive, setMinTimeToLive, setMinTimeToLiveSecondsaddChildConfig, addChildConfigs, passCacheToChildConfig, removeChildConfig, removeChildConfigs, replaceChildConfig, replaceChildConfigs, setCache, testImmutabilitypublic LRUAlgorithmConfig()
public LRUAlgorithmConfig(long timeToLive,
long maxAge)
public LRUAlgorithmConfig(long timeToLive,
long maxAge,
int maxNodes)
public long getTimeToLive()
public void setTimeToLive(long timeToLive)
timeToLive - the time to live, in millisecondspublic void setTimeToLive(long timeToLive,
TimeUnit timeUnit)
@Deprecated public void setTimeToLiveSeconds(long time)
public long getMaxAge()
public void setMaxAge(long maxAge)
maxAge - value in millisecondspublic void setMaxAge(long maxAge,
TimeUnit timeUnit)
public void validate()
throws ConfigurationException
validate in interface EvictionAlgorithmConfigvalidate in class EvictionAlgorithmConfigBaseConfigurationException - if any values for the configuration
properties are invalidpublic boolean equals(Object o)
equals in class EvictionAlgorithmConfigBasepublic int hashCode()
hashCode in class EvictionAlgorithmConfigBasepublic void reset()
EvictionAlgorithmConfigreset in interface EvictionAlgorithmConfigreset in class EvictionAlgorithmConfigBasepublic LRUAlgorithmConfig clone() throws CloneNotSupportedException
clone in interface CloneableConfigurationComponentclone in interface EvictionAlgorithmConfigclone in class EvictionAlgorithmConfigBaseCloneNotSupportedExceptionCopyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.