eXo Kernel :: Component :: Cache Service 2.4.0-CR2

org.exoplatform.services.cache
Interface CacheListener<K extends Serializable,V>

All Known Implementing Classes:
InvalidationExoCache, LoggingCacheListener

public interface CacheListener<K extends Serializable,V>

The cache listener allows to be aware of various events that occurs for a cache. For performance reason a listener must perform short time lived operations or should consider to perform jobs asynchronously. Created by The eXo Platform SAS Author : Tuan Nguyen tuan08@users.sourceforge.net Sep 19, 2005


Method Summary
 void onClearCache(CacheListenerContext context)
          The cache is globally cleared.
 void onExpire(CacheListenerContext context, K key, V obj)
          An entry is expired from the cache.
 void onGet(CacheListenerContext context, K key, V obj)
          An entry is retrieved from the cache.
 void onPut(CacheListenerContext context, K key, V obj)
          An entry is inserted in the cache.
 void onRemove(CacheListenerContext context, K key, V obj)
          An entry is removed from the cache.
 

Method Detail

onExpire

void onExpire(CacheListenerContext context,
              K key,
              V obj)
              throws Exception
An entry is expired from the cache.

Parameters:
context - the listener context
key - the entry key
obj - the entry value
Throws:
Exception - any exception

onRemove

void onRemove(CacheListenerContext context,
              K key,
              V obj)
              throws Exception
An entry is removed from the cache.

Parameters:
context - the listener context
key - the entry key
obj - the entry value
Throws:
Exception - any exception

onPut

void onPut(CacheListenerContext context,
           K key,
           V obj)
           throws Exception
An entry is inserted in the cache.

Parameters:
context - the listener context
key - the entry key
obj - the entry value
Throws:
Exception - any exception

onGet

void onGet(CacheListenerContext context,
           K key,
           V obj)
           throws Exception
An entry is retrieved from the cache.

Parameters:
context - the listener context
key - the entry key
obj - the entry value
Throws:
Exception - any exception

onClearCache

void onClearCache(CacheListenerContext context)
                  throws Exception
The cache is globally cleared.

Parameters:
context - the listener context
Throws:
Exception - any exception

eXo Kernel :: Component :: Cache Service 2.4.0-CR2

Copyright © 2012 eXo Platform SAS. All Rights Reserved.