List of usage examples for java.util.concurrent ConcurrentHashMap ConcurrentHashMap
public ConcurrentHashMap(Map<? extends K, ? extends V> m)
From source file:com.sm.transport.netty.ClientAsynHandler.java
public ClientAsynHandler(long timeout) { this.timeout = timeout; this.map = new ConcurrentHashMap<Long, AsynReq>(119); }
From source file:com.sm.store.AppClientHandler.java
public AppClientHandler(long timeout) { this.timeout = timeout; this.map = new ConcurrentHashMap<Long, AsynReq>(119); }
From source file:com.sm.store.cluster.Utils.java
public static ConcurrentMap<Short, String[]> buildServerMap(List<ClusterNodes> nodes) { ConcurrentMap<Short, String[]> map = new ConcurrentHashMap<Short, String[]>(nodes.size()); for (ClusterNodes node : nodes) { map.put(node.getId(), node.getServerArray()); }/* w ww. j a va2s . c o m*/ return map; }
From source file:com.sm.store.client.netty.ClusterClientHandler.java
public ClusterClientHandler(long timeout, Serializer serializer) { this.timeout = timeout; this.serializer = serializer; this.map = new ConcurrentHashMap<Long, AsynReq>(119); }
From source file:de.hybris.platform.acceleratorstorefrontcommons.security.impl.DefaultBruteForceAttackCounter.java
public DefaultBruteForceAttackCounter(final Integer maxFailedLogins, final Integer cacheExpiration, final Integer cacheSizeLimit) { Assert.notNull(maxFailedLogins, "Constructor param maxFailedLogins must not be null."); Assert.notNull(cacheExpiration, "Constructor param cacheExpiration must not be null."); Assert.notNull(cacheSizeLimit, "Constructor param cacheSizeLimit must not be null."); bruteForceAttackCache = new ConcurrentHashMap((int) 0.5 * cacheSizeLimit.intValue()); this.maxFailedLogins = maxFailedLogins; this.cacheSizeLimit = cacheSizeLimit; this.cacheExpiration = cacheExpiration; }
From source file:com.louding.frame.http.HttpParams.java
private void init(int i) { urlParams = new ConcurrentHashMap<String, Object>(8); fileWraps = new ConcurrentHashMap<String, FileWrapper>(i); }
From source file:com.liferay.portal.template.velocity.internal.FastExtendedProperties.java
@Override public Object clone() { FastExtendedProperties fastExtendedProperties = (FastExtendedProperties) super.clone(); fastExtendedProperties._map = new ConcurrentHashMap<>(_map); return fastExtendedProperties; }
From source file:com.sm.store.client.netty.StoreClientHandler.java
public StoreClientHandler(long timeout) { this.timeout = timeout; this.map = new ConcurrentHashMap<Long, AsynReq>(119); }
From source file:gridool.taskqueue.sender.SenderResponseTaskQueue.java
public SenderResponseTaskQueue(@Nonnull GridResourceRegistry resourceRegistry) { this.marshaller = resourceRegistry.getMarshaller(); this.queueMap = new ConcurrentHashMap<String, BlockingQueue<GridTaskResult>>(16); this.registry = resourceRegistry; }
From source file:hivemall.mix.store.SessionStore.java
@Nonnull public SessionObject get(@Nonnull String groupID) { SessionObject sessionObj = sessions.get(groupID); if (sessionObj == null) { ConcurrentMap<Object, PartialResult> map = new ConcurrentHashMap<Object, PartialResult>( EXPECTED_MODEL_SIZE);/*w w w . j a va 2 s .com*/ sessionObj = new SessionObject(map); SessionObject existing = sessions.putIfAbsent(groupID, sessionObj); if (existing != null) { sessionObj = existing; } } return sessionObj; }