Example usage for com.google.common.util.concurrent AtomicLongMap remove

List of usage examples for com.google.common.util.concurrent AtomicLongMap remove

Introduction

In this page you can find the example usage for com.google.common.util.concurrent AtomicLongMap remove.

Prototype

public long remove(K key) 

Source Link

Document

Removes and returns the value associated with key .

Usage

From source file:com.navercorp.pinpoint.collector.util.AtomicLongMapUtils.java

private static <T> Map<T, Long> remove(AtomicLongMap<T> atomicLongMap, List<T> removeList) {
    final Map<T, Long> remove = new HashMap<>();
    for (T s : removeList) {
        final long value = atomicLongMap.remove(s);
        //              check zero ??
        //            if (value != 0) {
        //                remove.put(s, value);
        //            }
        remove.put(s, value);/*from   w  w w . ja v  a2s .co m*/
    }
    return remove;
}