-
1. Re: Monitoring puts and evictions
kagey Nov 23, 2006 4:16 PM (in response to kagey)just to help out anyone who has the same problem. I found additional listener methods in abstracttreecachelistener, that have the "pre" parameter. so i can listen for adds and evictions using the following listener methods:
for new inserts:
nodeModify(Fqn fqn, boolean pre, boolean isLocal)
where pre is false
for evictions:
nodeEvict(Fqn fqn, boolean pre)
where pre is true
cheers -
2. Re: Monitoring puts and evictions
brian.stansberry Nov 23, 2006 4:47 PM (in response to kagey)The methods with the "pre" parameter come from interface org.jboss.cache.ExtendedTreeCacheListener. So, you can implement that interface to get those callbacks. Subclassing AbstractTreeCacheListener is a simple way to do that, or you can write your own impl from scratch.
-
3. Re: Monitoring puts and evictions
manik Nov 29, 2006 9:27 AM (in response to kagey)Also, a much richer CacheListener interface in JBoss Cache 2.0.0 supercedes TreeCacheListener and ExtendedTreeCacheListener of 1.x.y.
See the 2.0.0 CacheListener javadoc (currently available as ALPHA1) for more info.