public interface 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()
Get the EvictionQueue implementation used by this algorithm.
|
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.
|
void process(BlockingQueue<EvictionEvent> queue) throws EvictionException
EvictionEvent
passed in.queue
- to processEvictionException
void resetEvictionQueue()
EvictionQueue getEvictionQueue()
void setEvictionActionPolicy(EvictionActionPolicy evictionActionPolicy)
evictionActionPolicy
- to setvoid assignToRegion(Fqn fqn, CacheSPI<?,?> cache, EvictionAlgorithmConfig evictionAlgorithmConfig, Configuration configuration)
fqn
- of the region to be assigned tocache
- cache referenceevictionAlgorithmConfig
- configuration for the current algorithm instance.configuration
- for the entire cache.boolean canIgnoreEvent(EvictionEvent.Type eventType)
eventType
- event type to test forvoid initialize()
Class<? extends EvictionAlgorithmConfig> getConfigurationClass()
EvictionAlgorithmConfig
implementation
class corresponding to this EvictionAlgorithm. E.g., the FIFOAlgorithm
would return FIFOAlgorithmConfig
.class.Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.