Difference between cache event types

classic Classic list List threaded Threaded
4 messages Options
pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Difference between cache event types

asked by adam miller

I'm looking to use a node local listener against one or more caches.

What is the difference between EVT_CACHE_ENTRY_CREATED and EVT_CACHE_OBJECT_PUT ?

I'm interested in a local listener that reacts to cache changes, specifically when an entry is added, modified or deleted.

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss
pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Re: Difference between cache event types

commented by dmitriy setrakyan

I think you need EVT_CACHE_OBJECT_PUT event for this purpose. You can always evaluate CacheEvent.oldValue to decide if the entry is new or is being updated (new entries will have old value set to null)

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss
pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Re: Difference between cache event types

commented by adam miller

Understand. Just for information sake, what is the difference between the EVTCACHE_ENTRY and the EVTCACHE_OBJECT notifications?

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss
pgarg pgarg
Reply | Threaded
Open this post in threaded view
|

Re: Difference between cache event types

This post was updated on .
commented by alexey goncharuk

EVT_CACHE_ENTRY_CREATED event is fired whenever cache entry is created. This can happen, for example, when explicit lock is acquired for an entry, an entry is enlisted in transaction, etc. EVT_CACHE_OBJECT_PUT is fired when actual write to cache happens.

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss