public class _ConcurrentMapFactory extends Object
java.util.concurrent.ConcurrentMap
-s on J2SE 5 or later,
plain maps otherwise. This is used for avoiding linking-time J2SE 5
dependency.
This class will be removed when J2SE 5 becomes the required
minimum for FreeMarker, so don't use it unless you are developing
FreeMarker itself.Constructor and Description |
---|
_ConcurrentMapFactory() |
Modifier and Type | Method and Description |
---|---|
static boolean |
concurrentMapsAvailable() |
static boolean |
isConcurrent(Map map)
Checks if the map is concurrent; safe to call before J2SE 5.
|
static Map |
newMaybeConcurrentHashMap() |
static Map |
newMaybeConcurrentHashMap(int initialCapacity,
float loadFactor,
int concurrencyLevel) |
static Map |
newThreadSafeMap()
Returns an instance of the "best" thread-safe
Map available in
the current runtime environment. |
public static Map newMaybeConcurrentHashMap()
public static Map newMaybeConcurrentHashMap(int initialCapacity, float loadFactor, int concurrencyLevel)
public static Map newThreadSafeMap()
Map
available in
the current runtime environment.public static boolean concurrentMapsAvailable()
public static boolean isConcurrent(Map map)
Copyright © 2016. All Rights Reserved.