List of usage examples for com.google.common.collect Maps newConcurrentMap
public static <K, V> ConcurrentMap<K, V> newConcurrentMap()
From source file:org.apache.bookkeeper.stream.storage.impl.kv.TableStoreCache.java
public TableStoreCache(MVCCStoreFactory mvccStoreFactory, TableStoreFactory tableStoreFactory) { this.mvccStoreFactory = mvccStoreFactory; this.tableStoreFactory = tableStoreFactory; this.tableStores = Maps.newConcurrentMap(); this.tableStoresOpening = Maps.newConcurrentMap(); }
From source file:com.metamx.druid.indexing.common.index.EventReceivingChatHandlerProvider.java
public EventReceivingChatHandlerProvider(ChatHandlerProviderConfig config, ServiceAnnouncer serviceAnnouncer) { this.config = config; this.serviceAnnouncer = serviceAnnouncer; this.handlers = Maps.newConcurrentMap(); }
From source file:net.awairo.mcmod.common.v1.util.config.ConfigHolder.java
/** * Constructor. */ protected ConfigHolder() { holder = Maps.newConcurrentMap(); forgeConfigSetTemp = Sets.newHashSet(); }
From source file:com.jfinal.ext.kit.ModelFingerprint.java
public void init() { map = Maps.newConcurrentMap(); Table tableInfo = TableMapping.me().getTable(clazz); if (!tableInfo.hasColumnLabel(fingerprintColumnLabel)) { throw new ActiveRecordException("fingerprintColumnLabel (" + fingerprintColumnLabel + ") is not exist"); }/*from w w w . j a v a2s . c om*/ LOG.info("begin load " + tableName() + " fingerprints"); List<Record> records = Db.find("SELECT id, " + fingerprintColumnLabel + " FROM " + tableName()); for (Record record : records) { map.put(record.getStr(fingerprintColumnLabel), record.getInt("id")); } LOG.info("end load " + tableName() + " fingerprints"); deleting = Sets.newHashSet(map.values()); LOG.info("loaded " + deleting.size() + " data"); }
From source file:io.druid.indexing.common.index.ServiceAnnouncingChatHandlerProvider.java
@Inject public ServiceAnnouncingChatHandlerProvider(@Self DruidNode node, ServiceAnnouncer serviceAnnouncer) { this.node = node; this.serviceAnnouncer = serviceAnnouncer; this.handlers = Maps.newConcurrentMap(); }
From source file:com.infinities.skyport.distributed.impl.local.LocalCache.java
public LocalCache(Throwable e) { if (e == null) { throw new NullPointerException("e cannot be null"); }//from w w w .java 2 s . c o m this.e = e; this.map = Maps.newConcurrentMap(); }
From source file:org.ros.internal.node.topic.TopicParticipantManager.java
public TopicParticipantManager() { publishers = Maps.newConcurrentMap(); subscribers = Maps.newConcurrentMap(); subscriberConnections = HashMultimap.create(); publisherConnections = HashMultimap.create(); }
From source file:com.griddynamics.jagger.util.AgentUtils.java
public static Map<String, MBeanServerConnection> getMBeanConnections(final Map<String, JMXConnector> connectors) throws IOException { Map<String, MBeanServerConnection> mBeanConnections = Maps.newConcurrentMap(); for (String service : connectors.keySet()) { mBeanConnections.put(service, connectors.get(service).getMBeanServerConnection()); }/*from w w w.j av a2 s. c o m*/ return mBeanConnections; }
From source file:com.facebook.buck.remoteexecution.RemoteExecutionEventListener.java
public RemoteExecutionEventListener() { this.downloads = new AtomicInteger(0); this.donwloadBytes = new AtomicLong(0); this.uploads = new AtomicInteger(0); this.uploadBytes = new AtomicLong(0); this.totalBuildRules = new AtomicInteger(0); this.hasFirstRemoteActionStarted = new AtomicBoolean(false); this.actionStateCount = Maps.newConcurrentMap(); for (State state : RemoteExecutionActionEvent.State.values()) { actionStateCount.put(state, new AtomicInteger(0)); }/*from w w w.j a v a 2s .c o m*/ }
From source file:org.sonatype.nexus.security.config.MemorySecurityConfiguration.java
public MemorySecurityConfiguration() { users = Maps.newConcurrentMap(); roles = Maps.newConcurrentMap(); privileges = Maps.newConcurrentMap(); userRoleMappings = Maps.newConcurrentMap(); }