1 Reply Latest reply on Dec 16, 2013 10:40 AM by praveen435

    how to capture the key for which the expiration time is reached?

    praveen435

      HI,

      I had two caches(usedcache, availblecache). I set up the expiration time for usedcache.

      So after expiry time is reached in the usedcache, i want to put back the corresponding values to the availablecache.

      I tried with using events. I configured events for usedcache.Events are getting raised once the entry in the cache is inserted,updated and deleted.

      But how to capture the key for which the expiration time is reached?

       

      Regards,

      Praveen

        • 1. Re: how to capture the key for which the expiration time is reached?
          praveen435

          Sorry Guys,
          Just came to know that there are methods to retrieve key and value on which the event occurs.

                  public void entryDeleted(MapEvent evt)
                      {
                      System.out.println(evt);
                      String key = (String)evt.getKey();
                      Person value = (Person)evt.getOldValue();
                      System.out.println(evt.getKey());

                        }

           

          -Praveen