2 Replies Latest reply on Apr 25, 2012 6:03 AM by Dushyant Tiwari

    Custom co-location

    Dushyant Tiwari Newbie

      Does Infinispan provides a way to explicitly co-locate logically related keys?

      The use case is like :

      3 maps are there : A, B and C

      now there will be different entities strored in these maps against keys (custom java objects). These keys has 2 properties : entityId and routingId.

      Now I want all the keys with the same routing Id to be located together on a node. Even if they are the keys of different maps. How to achieve this in infinispan.


      To draw an analogy with other dist cache products a custom interface can be implemented by the key class and then one can return the object to hash using a method implemented. So if we return same routingId(string) we are gurranted that the entities are co-located.