public void notifyElement( Ehcache cache, boolean local,Element arg1, int action)
{
if (cache != this.ehcache)
{
System.out.println ("Cache=" + cache.getName() + " is not my cache=" + this.ehcache.getName());
return;
}
try
{
EhCacheDistributedElementImpl e = (EhCacheDistributedElementImpl) refList
.get(arg1.getKey());
if (e != null)
{
if (action < 0)
refList.remove(arg1.getKey());
else if (action == CacheElement.ActionAdded)
refList.put(arg1.getKey(), new EhCacheDistributedElementImpl(arg1));
e.notifyChange(action);
notifyListeners(local, action, arg1.getKey(), arg1.getObjectValue());
}
else
{
notifyListeners(local, action, arg1.getKey(), null);
}
} catch (Exception e)
{
e.printStackTrace();
}
}