|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EvictionPolicy
Generic eviction policy interface.
None of the Eviction classes are thread safe. It is assumed that an individual instance of an EvictionPolicy/ EvictionAlgorithm/EvictionQueue/EvictionConfiguration are only operated on by one thread at any given time.
Method Summary | |
---|---|
boolean |
canIgnoreEvent(Fqn fqn,
NodeEventType eventType)
This method will be invoked prior to an event being processed for a node with the specified Fqn. |
void |
evict(Fqn fqn)
Evict a node form the underlying cache. |
CacheSPI |
getCache()
|
EvictionAlgorithm |
getEvictionAlgorithm()
Get the associated EvictionAlgorithm used by the EvictionPolicy. |
Class<? extends EvictionPolicyConfig> |
getEvictionConfigurationClass()
The EvictionPolicyConfig implementation class used by this EvictionPolicy. |
void |
setCache(CacheSPI cache)
Method called to set the cache in this implementation. |
Method Detail |
---|
void evict(Fqn fqn) throws Exception
fqn
- DataNode corresponds to this fqn.
Exception
CacheSPI getCache()
void setCache(CacheSPI cache)
cache
- the cache to setEvictionAlgorithm getEvictionAlgorithm()
Class<? extends EvictionPolicyConfig> getEvictionConfigurationClass()
boolean canIgnoreEvent(Fqn fqn, NodeEventType eventType)
event types
in which the particular
eviction algorithm has no interest.
If this method returns false then the event is processed normally
and eviction processing for the node continues. As a result, the event
will be added to the eviction region's
event queue where
at some later point the particular algorithm of the eviction policy
can use it to decide whether to call evict(Fqn)
.
If this method returns true, then the event is ignored and will not factor
in any subsequent eviction processing.
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |