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.eclipse.milo.opcua.stack.core.types.OpcUaXmlDataTypeDictionary.java

public OpcUaXmlDataTypeDictionary(String namespaceUri, Map<String, OpcUaXmlDataTypeCodec<?>> byDescription,
        Map<NodeId, OpcUaXmlDataTypeCodec<?>> byEncodingId) {

    this.namespaceUri = namespaceUri;

    codecsByDescription = Maps.newConcurrentMap();
    codecsByDescription.putAll(byDescription);

    codecsByEncodingId = Maps.newConcurrentMap();
    codecsByEncodingId.putAll(byEncodingId);
}

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

public OpcUaBinaryDataTypeDictionary(String namespaceUri,
        Map<String, OpcUaBinaryDataTypeCodec<?>> byDescription,
        Map<NodeId, OpcUaBinaryDataTypeCodec<?>> byEncodingId) {

    this.namespaceUri = namespaceUri;

    codecsByDescription = Maps.newConcurrentMap();
    codecsByDescription.putAll(byDescription);

    codecsByEncodingId = Maps.newConcurrentMap();
    codecsByEncodingId.putAll(byEncodingId);
}

From source file:org.ros.internal.message.context.MessageContextProvider.java

public MessageContextProvider(MessageFactory messageFactory) {
    Preconditions.checkNotNull(messageFactory);
    this.messageFactory = messageFactory;
    cache = Maps.newConcurrentMap();
}

From source file:de.cosmocode.palava.ipc.conversation.AbstractConversation.java

@Override
protected ConcurrentMap<Object, Object> delegate() {
    if (map == null) {
        map = Maps.newConcurrentMap();
    }
    return map;
}

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

public TelemetryEntry(String module, String service, TelemetryCounter.Status status) {
    this.module = module;
    this.service = service;
    this.status = status;
    lastUpdate = System.currentTimeMillis() / 1000;
    metrics = Maps.newConcurrentMap();
}

From source file:org.lanternpowered.server.util.collect.Maps2.java

public static <K, V, B extends ExpirableValue<V>> ExpirableValueMap<K, V, B> createConcurrentExpirableValueMap(
        BiFunction<K, V, B> backingEntrySupplier) {
    return new ExpirableValueMapImpl<>(Maps.newConcurrentMap(), backingEntrySupplier);
}

From source file:com.zaradai.kunzite.trader.orders.book.ConcurrentOrderBook.java

@Override
protected Map<String, Order> createOrderMap() {
    return Maps.newConcurrentMap();
}

From source file:com.zaradai.distributor.messaging.ConnectionManager.java

protected ConcurrentMap<InetSocketAddress, Connection> createConnectionsMap() {
    return Maps.newConcurrentMap();
}

From source file:com.jivesoftware.sdk.api.entity.impl.memory.MemoryStorageInstanceProvider.java

public MemoryStorageInstanceProvider() {
    if (log.isTraceEnabled()) {
        log.trace("constructor called...");
    }
    memoryStorageInstanceStore = Maps.newConcurrentMap();
}

From source file:co.cask.tigon.data.transaction.queue.inmemory.InMemoryQueueService.java

/**
 * Package visible constructor so that instance of this class can only be created through Guice.
 */
@Inject
private InMemoryQueueService() {
    queues = Maps.newConcurrentMap();
}