ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Magda <dma...@gridgain.com>
Subject Re: Is there a way to get the value that was evicted from the cache
Date Mon, 23 Nov 2015 10:49:53 GMT

Actually the event holds the value that is evicted as well. Please refer to
this listener example below:

    /** Eviction event listener. */
    private static class EvictListener implements IgnitePredicate<Event> {
        /** {@inheritDoc} */
        @Override public boolean apply(Event evt) {
            if (evt.type() == EVT_CACHE_ENTRY_EVICTED) {
                CacheEvent event = (CacheEvent)evt;

                System.out.println("Evicted key = " + event.key() + " ,
value=" + event.oldValue());
            return true;

And please properly subscribe to the user list (this way we will not have to
manually approve your emails). All you need to do is send an email to
“user-subscribe@ignite.apache.org” and follow simple instructions in the


View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Is-there-a-way-to-get-the-value-that-was-evicted-from-the-cache-tp2032p2038.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message