Class ConcurrentHashMapWrapper<S,​T>


  • public class ConcurrentHashMapWrapper<S,​T>
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.ConcurrentHashMap<S,​T> map  
      private static java.lang.Object NULL
      ConcurrentHashMap doesn't support null keys or values so this is a hack to support them
      private S S_NULL  
      private T T_NULL  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsKey​(S key)  
      T get​(S key)  
      java.util.Set<S> keySet()
      NOT MODIFIABLE
      T put​(S key, T value)  
      void putAll​(java.util.Map<S,​T> from_map)  
      T remove​(S key)  
      java.util.TreeMap<S,​T> toTreeMap()
      Helper for config writing
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NULL

        private static final java.lang.Object NULL
        ConcurrentHashMap doesn't support null keys or values so this is a hack to support them
      • S_NULL

        private final S S_NULL
      • T_NULL

        private final T T_NULL
      • map

        private final java.util.concurrent.ConcurrentHashMap<S,​T> map
    • Constructor Detail

      • ConcurrentHashMapWrapper

        public ConcurrentHashMapWrapper​(int initialCapacity)
      • ConcurrentHashMapWrapper

        public ConcurrentHashMapWrapper​(int initialCapacity,
                                        float loadFactor,
                                        int concurrencyLevel)
      • ConcurrentHashMapWrapper

        public ConcurrentHashMapWrapper()
      • ConcurrentHashMapWrapper

        public ConcurrentHashMapWrapper​(java.util.Map<S,​T> init_map)
    • Method Detail

      • putAll

        public void putAll​(java.util.Map<S,​T> from_map)
      • put

        public T put​(S key,
                     T value)
      • get

        public T get​(S key)
      • remove

        public T remove​(S key)
      • containsKey

        public boolean containsKey​(S key)
      • keySet

        public java.util.Set<S> keySet()
        NOT MODIFIABLE
        Returns:
      • toTreeMap

        public java.util.TreeMap<S,​T> toTreeMap()
        Helper for config writing
        Returns: