public class NullEvictionAlgorithm extends Object implements EvictionAlgorithm
| Modifier and Type | Method and Description |
|---|---|
void |
assignToRegion(Fqn fqn,
CacheSPI<?,?> cache,
EvictionAlgorithmConfig evictionAlgorithmConfig,
Configuration configuration)
Assigns the algorithm instance to a specific region.
|
boolean |
canIgnoreEvent(EvictionEvent.Type eventType)
Tests whether the algorithm would ignore certain event types on certain Fqns.
|
Class<? extends EvictionAlgorithmConfig> |
getConfigurationClass()
This is a helper so that the XML parser will be able to select and use the correct
EvictionAlgorithmConfig implementation
class corresponding to this EvictionAlgorithm. |
EvictionQueue |
getEvictionQueue()
Returns
NullEvictionQueue.INSTANCE. |
static NullEvictionAlgorithm |
getInstance() |
void |
initialize()
Invoked by the region manager when the enclosing region is initialized.
|
void |
process(BlockingQueue<EvictionEvent> queue)
Entry point for eviction algorithm.
|
void |
resetEvictionQueue()
Reset the whole eviction queue.
|
void |
setEvictionActionPolicy(EvictionActionPolicy evictionActionPolicy)
Sets the eviction action policy, so the algorithm knows what to do when a node is to be evicted.
|
public static NullEvictionAlgorithm getInstance()
public EvictionQueue getEvictionQueue()
NullEvictionQueue.INSTANCE.getEvictionQueue in interface EvictionAlgorithmpublic void setEvictionActionPolicy(EvictionActionPolicy evictionActionPolicy)
EvictionAlgorithmsetEvictionActionPolicy in interface EvictionAlgorithmevictionActionPolicy - to setpublic void assignToRegion(Fqn fqn, CacheSPI<?,?> cache, EvictionAlgorithmConfig evictionAlgorithmConfig, Configuration configuration)
EvictionAlgorithmassignToRegion in interface EvictionAlgorithmfqn - of the region to be assigned tocache - cache referenceevictionAlgorithmConfig - configuration for the current algorithm instance.configuration - for the entire cache.public void process(BlockingQueue<EvictionEvent> queue) throws EvictionException
EvictionAlgorithmEvictionEvent
passed in.process in interface EvictionAlgorithmqueue - to processEvictionExceptionpublic void resetEvictionQueue()
EvictionAlgorithmresetEvictionQueue in interface EvictionAlgorithmpublic boolean canIgnoreEvent(EvictionEvent.Type eventType)
EvictionAlgorithmcanIgnoreEvent in interface EvictionAlgorithmeventType - event type to test forpublic void initialize()
EvictionAlgorithminitialize in interface EvictionAlgorithmpublic Class<? extends EvictionAlgorithmConfig> getConfigurationClass()
EvictionAlgorithmEvictionAlgorithmConfig implementation
class corresponding to this EvictionAlgorithm. E.g., the FIFOAlgorithm would return FIFOAlgorithmConfig.class.getConfigurationClass in interface EvictionAlgorithmCopyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.