Class SynchronizedHashMultiMap<K,V>
java.lang.Object
org.apache.bookkeeper.util.collections.SynchronizedHashMultiMap<K,V>
Simple multimap implementation that only stores key reference once.
Implementation is aimed at storing PerChannelBookieClient completions when there are duplicates. If the key is a pooled object, it must not exist once the value has been removed from the map, which can happen with guava multimap implementations.
With this map is implemented with pretty heavy locking, but this shouldn't be an issue as the multimap only needs to be used in rare cases, i.e. when a user tries to read or the same entry twice at the same time. This class should *NOT* be used in critical path code.
A unique key-value pair will only be stored once.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
map
-
-
Constructor Details
-
SynchronizedHashMultiMap
public SynchronizedHashMultiMap()
-
-
Method Details
-
put
-
getAnyKey
-
removeAny
-
removeIf
-