public class LRUAlgorithmConfig extends EvictionAlgorithmConfigBase
LRUAlgorithm
.
evictionAlgorithmClassName, maxNodes, minTimeToLive
log
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, setMinTimeToLiveSeconds
addChildConfig, addChildConfigs, passCacheToChildConfig, removeChildConfig, removeChildConfigs, replaceChildConfig, replaceChildConfigs, setCache, testImmutability
public 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 EvictionAlgorithmConfig
validate
in class EvictionAlgorithmConfigBase
ConfigurationException
- if any values for the configuration
properties are invalidpublic boolean equals(Object o)
equals
in class EvictionAlgorithmConfigBase
public int hashCode()
hashCode
in class EvictionAlgorithmConfigBase
public void reset()
EvictionAlgorithmConfig
reset
in interface EvictionAlgorithmConfig
reset
in class EvictionAlgorithmConfigBase
public LRUAlgorithmConfig clone() throws CloneNotSupportedException
clone
in interface CloneableConfigurationComponent
clone
in interface EvictionAlgorithmConfig
clone
in class EvictionAlgorithmConfigBase
CloneNotSupportedException
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.