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.OpcUaBinaryDataTypeDictionary.java

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

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

From source file:org.ros.internal.message.DefaultMessageInterfaceClassProvider.java

public DefaultMessageInterfaceClassProvider() {
    cache = Maps.newConcurrentMap();
}

From source file:com.zaradai.config.InMemoryConfigurationSource.java

protected Map<String, String> createConfigMap() {
    return Maps.newConcurrentMap();
}

From source file:de.hh.changeRing.infrastructure.eclipselink.MappingCustomizer.java

private static Map<Class<?>, Converter> initializeConverters() {
    ConcurrentMap<Class<?>, Converter> result = Maps.newConcurrentMap();
    result.put(DateTime.class, new JodaDateTimeConverter());
    result.put(LocalDate.class, new JodaLocalDateConverter());
    result.put(LocalTime.class, new JodaLocalTimeConverter());
    result.put(LocalDateTime.class, new JodaLocalDateTimeConverter());
    result.put(DateMidnight.class, new JodaDateMidnightConverter());
    return result;
}

From source file:com.github.autermann.wps.streaming.util.dependency.InMemoryRepository.java

public InMemoryRepository() {
    this.inputs = Maps.newConcurrentMap();
    this.outputs = Maps.newConcurrentMap();
}

From source file:com.turn.sorcerer.pipeline.executable.impl.ScheduledPipeline.java

/**
 * Checks if pipeline is complete/*ww w.jav  a  2  s. c  om*/
 *
 */
@Override
public void updatePipelineCompletion() {
    Map<String, Boolean> newTaskCompletionMap = Maps.newConcurrentMap();

    for (String t : taskCompletionMap.keySet()) {
        newTaskCompletionMap.put(t, false);
        if (StatusManager.get().isTaskComplete(SorcererInjector.get().getTaskType(t), this.iterationNum)) {
            newTaskCompletionMap.put(t, true);
        }
    }

    taskCompletionMap = newTaskCompletionMap;

    for (boolean completed : taskCompletionMap.values()) {
        if (!completed) {
            return;
        }
    }

    logger.debug(pipelineType.getName() + " for " + getId() + " is complete. ");

    if (StatusManager.get().isPipelineComplete(this.pipelineType, this.iterationNum) == false) {
        logger.info("Committing status for " + pipelineType.getName() + ":" + getId());
        StatusManager.get().commitPipelineStatus(this.pipelineType, this.iterationNum, Status.SUCCESS);
    }

}

From source file:com.palantir.atlasdb.transaction.impl.ConflictDetectionManager.java

public ConflictDetectionManager(RecomputingSupplier<Map<String, ConflictHandler>> supplier) {
    this.supplier = supplier;
    this.overrides = Maps.newConcurrentMap();
}

From source file:de.cosmocode.palava.scope.ConcurrentMapScopeContext.java

@Override
protected final ConcurrentMap<Object, Object> delegate() {
    if (context == null) {
        context = Maps.newConcurrentMap();
    }// w  ww .  j ava2s  . c o m
    return context;
}

From source file:org.onosproject.net.intent.impl.InstallerRegistry.java

public InstallerRegistry() {
    installers = Maps.newConcurrentMap();
}

From source file:org.ros.internal.message.StringResourceProvider.java

public StringResourceProvider() {
    cache = Maps.newConcurrentMap();
}