2 Replies Latest reply on Oct 9, 2018 2:37 PM by Jagadeesh kalaiyarasan

    Is any performance difference between  Getting value directly from distributed Cache and event.getValue() when CacheEventListener fire?

    Jagadeesh kalaiyarasan Newbie

      sir,

           We are using infinispan 8.1.3 version.We have Two infinispan nodes.Both are communicating through distributed Cache event listeners.

       

      Here, When Cache event listeners fire,

      Can get value as follows methode

       

      way1:

       

      String value =event.getValue();

      Cache cache=event.getCache();

      cache.remove(event.getKey());//set flag as no return value

       

      way2:

       

      Cache cache=event.getCache();//obtain cache from event

      String value = cache.remove(event.getKey());//set flag as return value

       

       

      way3:

       

      Cache cache=getCacheLocalSystem();

      String value = cache.remove(event.getKey());//set flag as return value

       

       

      what is best way from performance point of view from above??

       

      thanks