Java AtomicInteger getExceptionCountMap()

Here you can find the source of getExceptionCountMap()

Description

get Exception Count Map

License

Apache License

Declaration

public static Map<String, Integer> getExceptionCountMap() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.HashMap;
import java.util.Map;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;

public class Main {
    private static Map<String/*exception or method*/, AtomicInteger> exceptionCount = new ConcurrentHashMap<String, AtomicInteger>();

    public static Map<String, Integer> getExceptionCountMap() {
        return getCountMap(exceptionCount);
    }//  w  ww. ja v a 2  s.  c o  m

    private static Map<String, Integer> getCountMap(Map<String, AtomicInteger> countMap) {
        Map<String, Integer> result = new HashMap<String, Integer>();
        for (Map.Entry<String, AtomicInteger> entry : countMap.entrySet()) {
            result.put(entry.getKey(), entry.getValue().get());
        }
        return result;
    }
}

Related

  1. generateUniqueId()
  2. getAllocationFailureCount()
  3. getAndResetInvocationCount()
  4. getAndResetInvocationCount()
  5. getCriticalExceptionCount()
  6. getFailedMiddlePartNumbers(PartListing partListing)
  7. getGetPendingWrTransaction()
  8. getGuid(Object clazz)
  9. getId()