Interface BlockingReferenceMap<K,V>

Type Parameters:
K - the key type
V - the value type
All Superinterfaces:
Reference<Map<K,V>>

public interface BlockingReferenceMap<K,V> extends Reference<Map<K,V>>
Encapsulates thread-safe references to map entries.
Author:
Paul Ferraro
  • Method Details

    • reference

      BlockingReference<V> reference(K key)
      Returns a reference to the map entry for the specified key.
      Parameters:
      key - a map key
      Returns:
      a reference to the map entry for the specified key.
    • of

      static <K, V> BlockingReferenceMap<K,V> of(Map<K,V> map)
      Returns a thread-safe map of the specified map.
      Type Parameters:
      K - the map key type
      V - the map value type
      Parameters:
      map - a non-thread-safe map
      Returns:
      a thread-safe map of the specified map.