Concurrent Hash Map
Android implementation of ConcurrentHashMap that delegates to java.util.concurrent.ConcurrentHashMap. This provides true thread-safe concurrent access with high performance on the Android platform.
Parameters
the type of keys maintained by this map
the type of mapped values
A thread-safe MutableMap implementation that provides concurrent access. Platform-specific implementations ensure thread safety according to the platform's concurrency model.
Parameters
the type of keys maintained by this map (must be non-nullable)
the type of mapped values (must be non-nullable)
JVM implementation of ConcurrentHashMap that delegates to java.util.concurrent.ConcurrentHashMap. This provides true thread-safe concurrent access with high performance on the JVM platform.
Parameters
the type of keys maintained by this map
the type of mapped values
Native implementation of ConcurrentHashMap using atomic operations. This implementation uses AtomicReference for thread-safe access to the underlying map. Note: This provides basic thread safety but may not have the same performance characteristics as the JVM implementation for high-concurrency scenarios.
Parameters
the type of keys maintained by this map
the type of mapped values
JavaScript implementation of ConcurrentHashMap that uses a regular MutableMap. JavaScript is single-threaded by default, so true concurrency is not needed. This implementation provides the same API but without thread-safety overhead.
Parameters
the type of keys maintained by this map
the type of mapped values
Constructors
Creates a new ConcurrentHashMap with the specified initial capacity.
Creates a new ConcurrentHashMap with the specified initial capacity and load factor.
Creates a new ConcurrentHashMap containing all mappings from the specified map.
Properties
Functions
Returns true if this map contains a mapping for the specified key.
Returns true if this map maps one or more keys to the specified value.
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
Associates the specified value with the specified key in this map.
Copies all of the mappings from the specified map to this map.
Atomically associates the specified key with the given value if the key is not already associated with a value.
Removes the mapping for a key from this map if it is present.
Atomically removes the entry for a key only if currently mapped to the specified value.
Atomically replaces the entry for a key only if currently mapped to some value.
Atomically replaces the entry for a key only if currently mapped to the specified value.