Interface DistributedMultimap<K,V>

All Superinterfaces:
DistributedPrimitive, com.google.common.collect.Multimap<K,V>, SyncPrimitive<DistributedMultimap<K,V>,AsyncDistributedMultimap<K,V>>

public interface DistributedMultimap<K,V> extends SyncPrimitive<DistributedMultimap<K,V>,AsyncDistributedMultimap<K,V>>, com.google.common.collect.Multimap<K,V>
This provides a synchronous version of the functionality provided by AsyncDistributedMultimap. Instead of returning futures this map blocks until the future completes then returns the result.
  • Method Details

    • builder

      static <K, V> DistributedMultimapBuilder<K,V> builder(AtomixChannel channel)
      Returns a new DistributedMultimap builder.
      Parameters:
      channel - the AtomixChannel
      Returns:
      the DistributedMultimap builder
    • keySet

      DistributedSet<K> keySet()
      Returns a set of the keys contained in this multimap with one or more associated values.
      Specified by:
      keySet in interface com.google.common.collect.Multimap<K,V>
      Returns:
      the collection of all keys with one or more associated values, this may be empty
    • keys

      Returns a multiset of the keys present in this multimap with one or more associated values each. Keys will appear once for each key-value pair in which they participate.
      Specified by:
      keys in interface com.google.common.collect.Multimap<K,V>
      Returns:
      a multiset of the keys, this may be empty
    • values

      Returns a collection of values in the set with duplicates permitted, the size of this collection will equal the size of the map at the time of creation.
      Specified by:
      values in interface com.google.common.collect.Multimap<K,V>
      Returns:
      a collection of values, this may be empty
    • entries

      Returns a collection of each key-value pair in this map.
      Specified by:
      entries in interface com.google.common.collect.Multimap<K,V>
      Returns:
      a collection of all entries in the map, this may be empty
    • asMap

      Specified by:
      asMap in interface com.google.common.collect.Multimap<K,V>
    • listen

      default Cancellable listen(MultimapEventListener<K,V> listener)
      Registers the specified listener to be notified whenever the map is updated.
      Parameters:
      listener - listener to notify about map events
    • listen

      Cancellable listen(MultimapEventListener<K,V> listener, Executor executor)
      Registers the specified listener to be notified whenever the map is updated.
      Parameters:
      listener - listener to notify about map events
      executor - executor to use for handling incoming map events