The list of methods to do ConcurrentMap are organized into topic(s).
C
addConcurrent(K key, C values, ConcurrentMap map) If map already has a value associated with the key it adds values to that value, otherwise it will put values to the map.
C currentValues = map.get(key);
if (currentValues == null) {
currentValues = map.putIfAbsent(key, values);
if (currentValues == null) {
return values;
synchronized (currentValues) {
...
int
addIfAbsent(K key, ConcurrentMap map, Object value) add If Absent
for (;;) {
Object[] newElements, elements = map.get(key);
if (elements == null && (elements = map.putIfAbsent(key, new Object[] { value })) == null)
return 0;
int i, len = i = elements.length;
while (--i >= 0) {
if (value.equals(elements[i]))
return -1;
...
void
clearDefaultResourceBundles() Clears the internal list of resource bundles.
ClassLoader ccl = getCurrentThreadContextClassLoader();
List<String> bundles = new ArrayList<>();
classLoaderMap.put(ccl.hashCode(), bundles);
bundles.add(0, XWORK_MESSAGES_BUNDLE);
ConcurrentMap
create(boolean sorted)
Returns a newly created Map object.
ConcurrentMap<K, V> map;
if (sorted) {
map = new ConcurrentSkipListMap<K, V>();
} else {
map = new ConcurrentHashMap<K, V>();
return map;
Map
createConcurrentMap()
INTERNAL: Creates new concurrent java.util.Map instance.
try {
Class<?> klass = Class.forName("java.util.concurrent.ConcurrentHashMap");
return (Map<K, V>) klass.newInstance();
} catch (Exception e1) {
try {
Class<?> klass = Class.forName("EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap");
return (Map<K, V>) klass.newInstance();
} catch (Exception e2) {
...
Integer
extractKeySize(String sslCipherSuite) Extract the SSL key size of a given cipher suite.
Integer keySize = keySizesCache.get(sslCipherSuite);
if (keySize == null) {
final int encAlgorithmIndex = sslCipherSuite.indexOf("WITH_");
if (encAlgorithmIndex >= 0) {
final String encAlgorithm = sslCipherSuite.substring(encAlgorithmIndex + 5);
if (encAlgorithm != null) {
if (encAlgorithm.startsWith("NULL_")) {
keySize = Integer.valueOf(0);
...