Listening to Cache Entry Update events

Whenever a Cache entry is updated, an event (i.e., CacheEntryEvent) is generated. In this post under JCache, I will show with an example how to create a listener to listen for those events and respond. We have to create a listener class which implements the javax.cache.event.CacheEntryUpdatedListener interface as shown below import java.util.Iterator; import javax.cache.event.CacheEntryEvent; import…… Continue reading Listening to Cache Entry Update events

Listening to Cache Entry Created events

Whenever a new Cache entry is created, an event (i.e., CacheEntryEvent) is generated. In this post under JCache, I will show with an example how to create a listener to listen for those events and respond. We have to create a listener class which implements the javax.cache.event.CacheEntryCreatedListener interface as shown below import java.util.Iterator; import javax.cache.event.CacheEntryCreatedListener;…… Continue reading Listening to Cache Entry Created events