Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

trigger in apache Ignite

Any one can tell me is there any Time based Trigger Policy available in Apache Ignite?

I Have an Object Having Expiry Date When That Date(Time-stamp) Expire I want to update This value and override it in Cache is it possible in Apache Ignite

Thanks in advance

like image 807
Sambhaji Sawant Avatar asked Feb 11 '26 11:02

Sambhaji Sawant


1 Answers

You can configure a time-based expiration policy in Apache Ignite with eager TTL: Expiry Policies. This way objects will be eagerly expired from cache after a certain time.

Then you can subscribe a javax.cache.event.CacheEntryExpiredListener, which will be triggered after every expiration, and update the cache from that listener. However, it looks like there will be a small window when the entry will have been already expired from a cache and before you put and updated value into cache.

If the above window is not acceptable to you, then you can simply query all entries from a cache periodically and update all the entries that are older than a certain expiration time. In this case you would have to ensure that all entries have a timestamp filed, which will be indexed and used in SQL queries. Something like this:

SELECT * from SOME_TYPE where timestamp > 2;

More on SQL queries here: Distributed Queries, Local Queries.

like image 173
Dmitriy Avatar answered Feb 15 '26 08:02

Dmitriy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!