Infinispan Cache Distribution-Asynchronous Mode Issue
Hi,
We are using infinispan in Distributed(Asynchronous) mode with 2-nodes. I am able to put a key in the cache but not able to read it immediately its returning null (Probably next statement).I tried in 2-ways
1-way
Cache
cache.put("key-1", "value-1");
System.out.println("Value for Key-1 : "+cache.get("key-1")); // This is Returning NULL in Asynchronous Mode
2-way
Cache
NotifyingFuture f1= cache.putAsync("key-1", "value-1");
try
{
f1.get();
}
catch(Exception e)
{
System.out.println("Excep occured: "+e);
}
System.out.println("Value for Key-1 : "+cache.get("key-1")); // This is Returning NULL in Asynchronous Mode
Cache Config XML
Looking forward for suggestions and help.
Regards,
Vadivel
Responses