Class ConcurrentCountMap<T>

  • Type Parameters:
    T - identifier used as a map key

    @Contract(threading=SAFE)
    public final class ConcurrentCountMap<T>
    extends java.lang.Object
    Concurrent map of integer counts.
    Since:
    5.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.ConcurrentMap<T,​java.util.concurrent.atomic.AtomicInteger> map  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.util.concurrent.atomic.AtomicInteger get​(T identifier)  
      int getCount​(T identifier)  
      int increaseCount​(T identifier)  
      void resetCount​(T identifier)  
      • Methods inherited from class java.lang.Object

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

      • map

        private final java.util.concurrent.ConcurrentMap<T,​java.util.concurrent.atomic.AtomicInteger> map
    • Constructor Detail

      • ConcurrentCountMap

        public ConcurrentCountMap()
    • Method Detail

      • getCount

        public int getCount​(T identifier)
      • resetCount

        public void resetCount​(T identifier)
      • increaseCount

        public int increaseCount​(T identifier)
      • get

        private java.util.concurrent.atomic.AtomicInteger get​(T identifier)