|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.cache.eviction.NullEvictionPolicy
public class NullEvictionPolicy
Eviction policy that does nothing and always tells the eviction interceptor an event can be ignored, saving the overhead of constructing and processing event objects. Basically useful as a default policy for a cache or subtree that is shared between multiple usages, some of which don't want eviction.
Constructor Summary | |
---|---|
NullEvictionPolicy()
Constructs a new NullEvictionPolicy. |
Method Summary | |
---|---|
boolean |
canIgnoreEvent(Fqn fqn,
NodeEventType eventType)
Returns true |
void |
evict(Fqn fqn)
No-op |
CacheSPI |
getCache()
|
EvictionAlgorithm |
getEvictionAlgorithm()
Returns NullEvictionAlgorithm.INSTANCE . |
Class<? extends EvictionPolicyConfig> |
getEvictionConfigurationClass()
Returns NullEvictionPolicyConfig . |
void |
setCache(CacheSPI cache)
Method called to set the cache in this implementation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NullEvictionPolicy()
Method Detail |
---|
public boolean canIgnoreEvent(Fqn fqn, NodeEventType eventType)
true
canIgnoreEvent
in interface EvictionPolicy
fqn
- The Fqn of the node associated with the event.eventType
- the type of the event
true
to ignore events of this type for this Fqn,
false
to process events normally.public void evict(Fqn fqn) throws Exception
evict
in interface EvictionPolicy
fqn
- DataNode corresponds to this fqn.
Exception
public EvictionAlgorithm getEvictionAlgorithm()
NullEvictionAlgorithm.INSTANCE
.
getEvictionAlgorithm
in interface EvictionPolicy
public Class<? extends EvictionPolicyConfig> getEvictionConfigurationClass()
NullEvictionPolicyConfig
.
getEvictionConfigurationClass
in interface EvictionPolicy
public CacheSPI getCache()
getCache
in interface EvictionPolicy
public void setCache(CacheSPI cache)
EvictionPolicy
setCache
in interface EvictionPolicy
cache
- the cache to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |