org.infinispan.eviction
Interface EvictionManager

All Known Implementing Classes:
EvictionManagerImpl

@ThreadSafe
public interface EvictionManager

Central component that deals with eviction of cache entries.

Typically, processEviction() is called periodically by the eviction thread (which can be configured using Configuration.setEvictionWakeUpInterval(long) and GlobalConfiguration.setEvictionScheduledExecutorFactoryClass(String)).

If the eviction thread is disabled - by setting (long) to 0 - then this method could be called directly, perhaps by any other maintenance thread that runs periodically in the application.

Note that this method is a no-op if the eviction strategy configured is EvictionStrategy.NONE.

Since:
4.0
Author:
Manik Surtani

Method Summary
 boolean isEnabled()
           
 void postEvict(Object key, InternalCacheEntry value)
           
 void preEvict(Object key)
           
 void processEviction()
          Processes the eviction event queue.
 

Method Detail

processEviction

void processEviction()
Processes the eviction event queue.


isEnabled

boolean isEnabled()
Returns:
true if eviction is enabled, false otherwise

preEvict

void preEvict(Object key)

postEvict

void postEvict(Object key,
               InternalCacheEntry value)

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.