Example usage for com.google.common.collect Maps newConcurrentMap

List of usage examples for com.google.common.collect Maps newConcurrentMap

Introduction

In this page you can find the example usage for com.google.common.collect Maps newConcurrentMap.

Prototype

public static <K, V> ConcurrentMap<K, V> newConcurrentMap() 

Source Link

Document

Returns a general-purpose instance of ConcurrentMap , which supports all optional operations of the ConcurrentMap interface.

Usage

From source file:org.sakaiproject.nakamura.util.telemetry.TelemetryCounter.java

public static void clear() {
    counters = Maps.newConcurrentMap();
}

From source file:org.eclipse.milo.opcua.stack.core.util.ManifestUtil.java

private static Map<String, String> load() {
    Map<String, String> attributes = Maps.newConcurrentMap();

    for (URI uri : uris()) {
        try {/*from w  ww.j  av a  2  s  .c om*/
            attributes.putAll(load(uri.toURL()));
        } catch (Throwable t) {
            logger.error("load(): '{}' failed", uri, t);
        }
    }

    return attributes;
}

From source file:com.enonic.cms.framework.blob.memory.MemoryBlobStore.java

public MemoryBlobStore() {
    this.store = Maps.newConcurrentMap();
}

From source file:org.geogit.storage.memory.Graph.java

/**
 * Creates an empty graph.
 */
Graph() {
    nodes = Maps.newConcurrentMap();
    mappings = Maps.newConcurrentMap();
}

From source file:org.eclipse.milo.opcua.stack.core.util.ManifestUtil.java

private static Map<String, String> load(InputStream stream) {
    Map<String, String> props = Maps.newConcurrentMap();

    try {//from  w  ww. java  2  s. c  om
        Manifest manifest = new Manifest(stream);
        Attributes attributes = manifest.getMainAttributes();

        for (Object key : attributes.keySet()) {
            String value = attributes.getValue((Attributes.Name) key);
            props.put(key.toString(), value);
        }
    } catch (Throwable t) {
        logger.error("#load(): failed", t);
    } finally {
        try {
            stream.close();
        } catch (IOException e) {
            // ignored
        }
    }

    return props;
}

From source file:com.zaradai.kunzite.optimizer.data.matrix.SafeSparseMatrix.java

@Override
protected Map<Pair, T> createMap() {
    return Maps.newConcurrentMap();
}

From source file:com.mac.halendpoint.endpoints.managers.impl.WebSocketManagerImpl.java

public WebSocketManagerImpl() {
    sockets = Maps.newConcurrentMap();
}

From source file:com.continuuity.loom.management.StatCounter.java

protected StatCounter() {
    this.stats = Maps.newConcurrentMap();
}

From source file:org.eclipse.milo.opcua.stack.core.types.OpcUaXmlDataTypeDictionary.java

public OpcUaXmlDataTypeDictionary(String namespaceUri) {
    this.namespaceUri = namespaceUri;

    codecsByDescription = Maps.newConcurrentMap();
    codecsByEncodingId = Maps.newConcurrentMap();
}

From source file:fr.webmarket.backend.auth.ClientSessionManager.java

private ClientSessionManager() {
    sessions = Maps.newConcurrentMap();
}