1 Reply Latest reply on Jul 5, 2012 7:54 PM by galder.zamarreno

    infinispan listeners - @CacheEntryVisited and @CacheEntryInvalidated

    borisha

      Hi,

       

      Is there any chance of improving documentation (JavaDoc) talking about cache listeners? It is very hard to find details on some events/how to trigger them etc.

       

      For example, I am not able to trigger @CacheEntryVisited and @CacheEntryInvalidated. Is @CacheEntryVisited triggered when someone does cache.get(K)? Is @CacheEntryInvalidated triggered when expiration happens for some of the elements in cache?

       

      thanks

      Borisa

        • 1. Re: infinispan listeners - @CacheEntryVisited and @CacheEntryInvalidated
          galder.zamarreno

          @CacheEntryVisited should be triggered with a get() call. Can you attach an example where it doesn't happen?

           

          @CacheEntryInvalidated gets fired when either: the cache is configured with invalidation and an entry is invalidated, or when the cache is configured with distribution and l1 cache, and an entry is invalidated.

           

          I'm sorry that the listeners are not properly documented. We will be moving to JSR-107 events at some point when we plan to revisit our listeners.