1 Reply Latest reply on Jul 27, 2016 4:30 AM by rvansa

    Remote cache Modification

    stejas7

      Hello Sir,

       

      Currently we use in memory cache with two level hashmap.we want to convert that map on infinispan using RemoteCache map of hotrod client.

       

      e.g  :-

      -----------------------------------------------------------------------------------------------------------

      HashMap<Integer,Object> abc = new Hashmap<Integer,Object>();


      HashMap<Integer,Object> xyz = new Hashmap<Integer,Object>();

       

      xyz.put(1,"tejas");

       

      abc.put(1,xyz);

       

      -------------------------------------------------------------------------------------------------------------

      Our requirment is get a value of second level map.and currently when we get a second level map value.

      Infinispan server is give me a whole value of first level map.

       

      So,how we modify remote cache to get that value of second level cache on single request on server.

       

      (Just because of reduce network traffic of infinispan server).

        • 1. Re: Remote cache Modification
          rvansa

          You cannot put the whole cache into another cache as value; you can put in its name, though:

          RemoteCache xyz = remoteCacheManager.getCache("xyz");

          xyz.put(1, "tejas");

          abc.put(1, xyz.getName())

           

          and later

           

          String cacheName = abc.get(1);

          RemoteCache xyz = remoteCacheManager.getCache(cacheName);

          String tejas = xyz.get(1);