-
1. Re: Listener callback not called
william.burns Feb 16, 2015 1:31 PM (in response to yairogen)1 of 1 people found this helpfulClustered listeners currently only provide CacheEntryCreated, CacheEntryModified and CacheEntryRemoved events. It sounds like you are expecting a CacheEntryExpired event, which is not supported by clustered listeners at this time. The CacheEntryRemoved event you have here is only fired if the entry is removed using one of the various remove methods defined on Cache/Map interface.
-
2. Re: Listener callback not called
yairogen Feb 16, 2015 1:37 PM (in response to william.burns)Brilliant. Thanks.
If I set clustered = false in the annotation will I be able to get the callback for expired entries in each entry in the cache assuming I add the listener in each instance?
-
3. Re: Listener callback not called
william.burns Feb 16, 2015 3:20 PM (in response to yairogen)1 of 1 people found this helpfulTheoretically, yes you could. However there are some issues with expiration events currently [1] & [2]. Galder and I actually just spoke about these various issues at our face to face infinispan group meeting last week and I believe we have a pretty good idea of what we need to get expiration events for both clustered and non clustered listeners in an acceptable and expected state. However I am guessing this won't be available until 7.2 or 8.0 at the earliest.
Really the only way you can get the "expiration event" is by receiving an eviction event from the cache store after the purge thread finds it and expires it. This is related to the issue [2].
[1] [ISPN-694] Create expiration notification for in-memory cache entries - JBoss Issue Tracker
[2] [ISPN-3960] Eviction notification from entry expired in cache store - JBoss Issue Tracker
-
4. Re: Listener callback not called
yairogen Feb 17, 2015 3:57 AM (in response to william.burns)Alas, CacheEntriesEvicted doesn't seem to be called at all. This appears to be broken altogether which is a shame.
-
5. Re: Listener callback not called
william.burns Feb 17, 2015 7:10 AM (in response to yairogen)It is called when the entry is expired from the Cache Store currently as highlighted in [2]. However there is no event generated when the in memory one is expired as [1] details.
[1] [ISPN-694] Create expiration notification for in-memory cache entries - JBoss Issue Tracker
[2] [ISPN-3960] Eviction notification from entry expired in cache store - JBoss Issue Tracker
Although I do agree it is in a shameful state currently, which is what we hope to remedy soon.
-
6. Re: Listener callback not called
yairogen Feb 17, 2015 9:57 AM (in response to william.burns)So effectively this doesn't work for me. I need it work also in a single node cluster as well as multi-node..
And you say it will be resolved only in version 8.x?
-
7. Re: Listener callback not called
nadirx Feb 18, 2015 6:15 AM (in response to yairogen)We will try to aim for 7.2 (end of April)
-
8. Re: Listener callback not called
yairogen Feb 18, 2015 7:16 AM (in response to nadirx)Great. Any where I can register to so I know when it was released and in which final version?
-
9. Re: Listener callback not called
nadirx Feb 18, 2015 7:42 AM (in response to yairogen)The jira issues that Will mentioned should be enough.