Package org.jivesoftware.openfire.group
Class ConcurrentGroupMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.concurrent.ConcurrentHashMap<K,V>
org.jivesoftware.openfire.group.ConcurrentGroupMap<K,V>
- All Implemented Interfaces:
Serializable,ConcurrentMap<K,,V> Map<K,,V> GroupAwareMap<K,V>
This extension class provides additional methods that understand groups among
the entries in the map.
- Author:
- Tom Evans
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ConcurrentHashMap
ConcurrentHashMap.KeySetView<K extends Object,V extends Object> Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Returns the groups that are implied (resolvable) from the keys in the map.Returns the groups that are implied (resolvable) from the values in the map.booleanincludesKey(Object key) Returns true if the key list contains the given JID.booleanincludesValue(Object value) Returns true if the map has an entry value matching the given JID.voidputIfAbsent(K key, V value) booleanbooleanMethods inherited from class java.util.concurrent.ConcurrentHashMap
compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, replaceAll, search, searchEntries, searchKeys, searchValues, size, toString, valuesMethods inherited from class java.util.AbstractMap
clone
-
Constructor Details
-
ConcurrentGroupMap
public ConcurrentGroupMap()
-
-
Method Details
-
includesKey
Returns true if the key list contains the given JID. If the JID is not found in the key list (exact match), search the key list for groups and look for the JID in each of the corresponding groups (implied match).- Specified by:
includesKeyin interfaceGroupAwareMap<K,V> - Parameters:
key- The target, presumably a JID- Returns:
- True if the target is in the key list, or in any groups in the key list
-
includesValue
Returns true if the map has an entry value matching the given JID. If the JID is not found in the value set (exact match), search the value set for groups and look for the JID in each of the corresponding groups (implied match).- Specified by:
includesValuein interfaceGroupAwareMap<K,V> - Parameters:
value- The target, presumably a JID- Returns:
- True if the target is in the value set, or in any groups in the value set
-
getGroupsFromKeys
Returns the groups that are implied (resolvable) from the keys in the map.- Specified by:
getGroupsFromKeysin interfaceGroupAwareMap<K,V> - Returns:
- A Set containing the groups among the keys
-
getGroupsFromValues
Returns the groups that are implied (resolvable) from the values in the map.- Specified by:
getGroupsFromValuesin interfaceGroupAwareMap<K,V> - Returns:
- A Set containing the groups among the values
-
put
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceConcurrentMap<K,V> - Specified by:
putIfAbsentin interfaceMap<K,V> - Overrides:
putIfAbsentin classConcurrentHashMap<K,V>
-
putAll
-
remove
-
remove
-
replace
-
replace
-
clear
public void clear()
-