You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tv...@apache.org on 2013/08/25 12:48:08 UTC
svn commit: r1517268 -
/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPCacheManager.java
Author: tv
Date: Sun Aug 25 10:48:08 2013
New Revision: 1517268
URL: http://svn.apache.org/r1517268
Log:
Use ConcurrentHashMap instead of a synchronized collection following an idea from JCS-72
Modified:
commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPCacheManager.java
Modified: commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPCacheManager.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPCacheManager.java?rev=1517268&r1=1517267&r2=1517268&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPCacheManager.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/jcs/auxiliary/lateral/socket/tcp/LateralTCPCacheManager.java Sun Aug 25 10:48:08 2013
@@ -21,9 +21,8 @@ package org.apache.jcs.auxiliary.lateral
import java.io.IOException;
import java.io.Serializable;
-import java.util.Collections;
-import java.util.HashMap;
import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -68,7 +67,7 @@ public class LateralTCPCacheManager
/** Address to instance map. */
protected static Map<String, LateralTCPCacheManager> instances =
- Collections.synchronizedMap( new HashMap<String, LateralTCPCacheManager>() );
+ new ConcurrentHashMap<String, LateralTCPCacheManager>();
/** ITCPLateralCacheAttributes */
protected ITCPLateralCacheAttributes lateralCacheAttributes;