List of usage examples for com.google.common.collect Maps newConcurrentMap
public static <K, V> ConcurrentMap<K, V> newConcurrentMap()
From source file:com.notifier.desktop.transport.usb.impl.UsbPortForwarder.java
public UsbPortForwarder(File androidSdkHome, Provider<UsbPortClient> portClientProvider) { this.adb = new Adb(); this.adb.setSdkHome(androidSdkHome); this.portClientProvider = portClientProvider; this.localPortCounter = LOCAL_PORT; this.devicesAndListeners = Maps.newConcurrentMap(); }
From source file:org.gradle.api.internal.project.antbuilder.FinalizerThread.java
public FinalizerThread(Map<ClassPath, CacheEntry> cacheEntries, Lock lock) { this.setName("Classloader cache reference queue poller"); this.setDaemon(true); this.referenceQueue = new ReferenceQueue<CachedClassLoader>(); this.cacheEntries = cacheEntries; this.cleanups = Maps.newConcurrentMap(); this.lock = lock; }
From source file:io.macgyver.core.script.BindingSupplierManager.java
public Map<String, Object> collect(Optional<String> lang) { Map<String, Object> m = Maps.newConcurrentMap(); collect(m, lang);// w w w.j a v a 2s.c o m return m; }
From source file:org.opendaylight.ovsdb.plugin.NodeDB.java
public void updateRow(String tableName, String uuid, Table<?> row) { ConcurrentMap<String, Table<?>> tableCache = getTableCache(tableName); if (tableCache == null) { tableCache = Maps.newConcurrentMap(); setTableCache(tableName, tableCache); }//from ww w. ja va 2s.co m tableCache.put(uuid, row); }
From source file:com.palantir.atlasdb.keyvalue.partition.util.EndpointRequestExecutor.java
private EndpointRequestExecutor() { numberOfTasksByEndpoint = ConcurrentHashMultiset.create(); endpointByFuture = Maps.newConcurrentMap(); }
From source file:rosjava_tf_example.Transformer.java
private Transformer() { transforms = Maps.newConcurrentMap(); }
From source file:com.voxelplugineering.voxelsniper.util.Context.java
/** * Creates a new {@link Context}. */ public Context() { this.data = Maps.newConcurrentMap(); }
From source file:org.graylog2.dashboards.widgets.WidgetResultCache.java
@Inject public WidgetResultCache(MetricRegistry metricRegistry, WidgetStrategyFactory widgetStrategyFactory) { this.metricRegistry = metricRegistry; this.widgetStrategyFactory = widgetStrategyFactory; this.cache = Maps.newConcurrentMap(); this.counter = metricRegistry.counter(name(getClass(), "cacheEntries")); }
From source file:com.zaradai.kunzite.optimizer.eval.local.MultiThreadedCalcEngine.java
protected Map<Class<? extends Evaluator>, Evaluator> createEvaluatorCache() { return Maps.newConcurrentMap(); }
From source file:org.ros.internal.message.new_style.MessageLoader.java
public MessageLoader() { searchPaths = Sets.newHashSet(); messageDefinitions = Maps.newConcurrentMap(); }