2 Replies Latest reply on Aug 20, 2012 10:25 PM by djordjevs

    Expiration Listener

    djordjevs

      Hi,

       

      I have an app where Infinispan cache is used as an uderlying source for a realtime blotter. Entries in the cache/blotter are added and removed by the app and by the cache itself (removed) when when they expire (except the immortal ones). I am using write-through and the cache is exact copy of the cache store. Everything works fine apart from a missing feature. A way of Infinispan notifying the app when the entries get expired so that the app can update the blotter.

       

      I am aware that Infinispan team don't want to implement this feature. This leaves me with option to implement my own reaper thread and do notifications from it (replacing the native implementation - I would like to avoid this, since it would force me to use calls like cache.keySet). The other option is to configure Infinispan differently to get effectively the same behaviour through a different configuration. I've had a look at eviction and passivation but I can't seem to be able to find the way how to keep the cache and the store in sync with eviction and passivation.

       

      Would anyone know how to use eviction and passivation while ensuring that both cache and store have the same content?

       

      Thanks

      SDJ

        • 1. Re: Expiration Listener
          mircea.markus

          I have an app where Infinispan cache is used as an uderlying source for a realtime blotter. Entries in the cache/blotter are added and removed by the app and by the cache itself (removed) when when they expire (except the immortal ones). I am using write-through and the cache is exact copy of the cache store. Everything works fine apart from a missing feature. A way of Infinispan notifying the app when the entries get expired so that the app can update the blotter.

          If you're reading everything through the cache API and not directly from the database, Infinispan makes sure that expired entries never reach you, i.e. you're on the safe side. Isn't this your use case?

          am aware that Infinispan team don't want to implement this feature

          Your request kind of make sense to me, was there any discussion you had on this topic with someone from ISPN?

          • 2. Re: Expiration Listener
            djordjevs

            First point answer is: YES. But I need to be notified when entries expire.

            Second point answer is: NO. I don't know who/what ISPN is.

             

            Markus, is the Infinispan team looking into implementing this fature? If so what are the timelines?

             

            Otherwise what would the best way to achive the same outcome with currently available features of the product?

             

            Thanks

            SDJ