Class ConcurrentChainedReference2ObjectHashTable<K,V>

java.lang.Object
ca.spottedleaf.concurrentutil.map.concurrent.objects.ConcurrentChainedReference2ObjectHashTable<K,V>
Type Parameters:
K - The type for keys in this map
V - The type for values in this map
All Implemented Interfaces:
Iterable<ConcurrentChainedReference2ObjectHashTable.TableEntry<K,V>>

public class ConcurrentChainedReference2ObjectHashTable<K,V> extends Object implements Iterable<ConcurrentChainedReference2ObjectHashTable.TableEntry<K,V>>
Concurrent hashtable implementation supporting mapping arbitrary non-null K values onto non-null V values with support for multiple writer and multiple reader threads.

Happens-before relationship

As with ConcurrentMap, there is a happens-before relationship between actions in one thread prior to writing to the map and access to the results of those actions in another thread.

Atomicity of functional methods

Functional methods are functions declared in this class which possibly perform a write (remove, replace, or modify) to an entry in this map as a result of invoking a function on an input parameter. Functional methods will be performed atomically, that is, the input parameter is guaranteed to only be invoked at most once per function call. However, the consequence of this behaviour is that a critical lock for a bin entry is held, which means that if the input parameter invocation makes additional calls to write into this hash table that the result is undefined and deadlock-prone.

See Also: