Class EmbeddedMultimapCache<K,​V>

  • All Implemented Interfaces:
    BasicMultimapCache<K,​V>, MultimapCache<K,​V>

    public class EmbeddedMultimapCache<K,​V>
    extends Object
    implements MultimapCache<K,​V>
    Embedded implementation of MultimapCache

    Transactions

    EmbeddedMultimapCache supports implicit transactions without blocking. The following methods block when they are called in a explicit transaction context. This limitation could be improved in the following versions if technically possible : More about transactions in : the Infinispan Documentation.

    Duplicates

    MultimapCache can optionally support duplicate values on keys. {@link
        multimapCache.put("k", "v1").join();
        multimapCache.put("k", "v2").join();
        multimapCache.put("k", "v2").join();
        multimapCache.put("k", "v2").join();
    
        multimapCache.get("k").thenAccept(values -> System.out.println(values.size()));
        // prints the value 4. "k" -> ["v1", "v2", "v2", "v2"]
     
    Since:
    9.2
    Author:
    Katia Aresti, karesti@redhat.com