Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Infinispan Cache Distribution-Asynchronous Mode Issue

    Posted on

    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 = getCacheManager().getCache("Demo");
    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 cache = getCacheManager().getCache("Demo");
    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

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat