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

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

Introduction

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

Prototype

public static <K> AtomicLongMap<K> create(Map<? extends K, ? extends Long> m) 

Source Link

Document

Creates an AtomicLongMap with the same mappings as the specified Map .

Usage

From source file:org.apache.accumulo.core.file.rfile.VisMetricsGatherer.java

@Override
public void startLocalityGroup(Text oneCF) {
    String name = null;/*from   w ww .j  av a2s.  co  m*/
    ByteSequence cf = new ArrayByteSequence(oneCF.toString());
    for (Entry<String, ArrayList<ByteSequence>> entry : localityGroupCF.entrySet()) {
        if (entry.getValue().contains(cf)) {
            if (entry.getKey() == null)
                name = null;
            else
                name = entry.getKey().toString();
            break;
        }
    }
    localityGroups.add(name);
    metric.put(name, AtomicLongMap.create(new HashMap<String, Long>()));
    blocks.put(name, AtomicLongMap.create(new HashMap<String, Long>()));
    numLG++;
    numEntries.add((long) 0);
    numBlocks.add(0);
}