Coherence triggered event upon creating cache

103 views Asked by At

I am developing a web page where server has to send a cache name to the client, when ever a new cache is created using ConfigurableCacheFactory.ensureCache() or CacheService.ensureCache() by any other extend clients.

Will there be any event that I can listen at the server end, which will be triggered after creating a coherence cache in cluster, such that I can listen to that event and send the newly created cache name to the client ? Any help would be appreciated. Thank you!!!

1

There are 1 answers

0
cpurdy On

Normally, I would start by looking at the LiveEvents feature. For example:

However, I don't think that there is an event for a cache being created. You can certainly detect when a cache is created, but it is a relatively low-level capability, e.g. implementing (over-riding) a ConfigurableCacheFactory, or a BackingMapManager, or a Backing Map. All are very advanced. Perhaps there is a simpler approach that you could consider? Like just putting that new cache name somewhere in a registry or a thread-local variable?