站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 Cache API Documentation 英文版文档

CacheListener (JBoss Cache API) - JBoss 3.2.7 Cache API Documentation 英文版文档


org.jboss.cache
Interface CacheListener


public interface CacheListener

Cache notification interface. We can register with a cache (Cache#addListener(CacheListener)) to receive notifications when modifications are made to the cache.

Version:
$Revision: 1.7.2.3 $
Author:
Bela Ban.

Method Summary
 void contentsCleared()
          Called after the entire contents of the map have been deleted
 void contentsInitialized(Map m)
          Called after the entire contents of the map have been set.
 void entryRemoved(Object key, Object old_value)
          Called after an entry has been removed.
 void entrySet(Object key, Object value, Object old_value)
          Called after an entry has been set.
 

Method Detail

contentsInitialized

public void contentsInitialized(Map m)
Called after the entire contents of the map have been set. This is more efficient than calling entrySet(Object,Object,Object) on each value

Parameters:
m - The new map. Its entries will overwrite whatever is already in the map.

contentsCleared

public void contentsCleared()
Called after the entire contents of the map have been deleted


entrySet

public void entrySet(Object key,
                     Object value,
                     Object old_value)
Called after an entry has been set. This could be the addition of a new entry, or the modification of an existing entry.

Parameters:
key - The new key
value - The new value
old_value - The value previously associated with key

entryRemoved

public void entryRemoved(Object key,
                         Object old_value)
Called after an entry has been removed.

Parameters:
key - The key identifying the entry
old_value - The old value associated with key


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.