My Oracle Support Banner

How To Get Only The Coherence Map Events And Not The Data Along With It So That The Events Are LightWeight? (Doc ID 2198663.1)

Last updated on OCTOBER 20, 2023

Applies to:

Oracle Coherence - Version 12.1.2.0.0 and later
Information in this document applies to any platform.

Goal

Coherence provides cache events using the JavaBean Event model. It is extremely simple to receive the events that user needs, where user needs them, regardless of where the changes are actually occurring in the cluster. Developers that are familiar with the JavaBean model should have no difficulties working with events, even in a complex cluster. In the JavaBeans Event model, there is an EventListener interface that all listeners must extend. Coherence provides a MapListener interface, which allows application logic to receive events when data in a Coherence cache is added, modified or removed.

The MapEvent object that is passed to the MapListener carries all of the necessary information about the event that has occurred, including the source (ObservableMap) that raised the event, the identity (key) that the event is related to, what the action was against that identity (insert, update or delete), what the old value was and what the new value is.

In some cases user does not need know the values but need to know event type to do some (a)synchronous post event processing, so it is a burden to carry values over the wire from cache cluster to cache clients. This is a network and memory stress to the nodes in the cluster. So...

How to get only the map events and not the data along with it so that the events are lightweight?
 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.