Class BmSegmentSyncMap<P,T>
- java.lang.Object
-
- com._1c.g5.v8.bm.common.collections.BmSegmentSyncMap<P,T>
-
@Deprecated public class BmSegmentSyncMap<P,T> extends Object
Deprecated.UseConcurrentHashMap.A map with segment synchronization. Implementation limited only for put/get/remove operations. Iterations are not supported.
-
-
Field Summary
Fields Modifier and Type Field Description protected longhashSaltDeprecated.Hash salt value
-
Constructor Summary
Constructors Constructor Description BmSegmentSyncMap(int segments)Deprecated.Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Map<P,T>asMap()Deprecated.Creates a copy of this map.voidclear()Deprecated.Clears map.booleancontainsKey(P key)Deprecated.Checks if the map contains the specified key.List<P>copyKeys()Deprecated.Copies keys.Tget(P key)Deprecated.Gets the value of the mapping with the specified key.Map<P,T>getMap(P key)Deprecated.Gets underlying segment map by key.Map<P,T>[]getSegments()Deprecated.Gets underlying segment maps.protected longhashSaltValue()Deprecated.Gets hash salt value.Tput(P key, T value)Deprecated.Maps the specified key to the specified value.voidputAll(Map<P,T> map)Deprecated.Copies all of the mappings from the specified map to this map.Tremove(P key)Deprecated.Removes the mapping with the specified key from this map.intsize()Deprecated.Returns the number of elements in this map.
-
-
-
Method Detail
-
clear
public void clear()
Deprecated.Clears map.
-
getMap
public Map<P,T> getMap(P key)
Deprecated.Gets underlying segment map by key.- Parameters:
key- The key.- Returns:
- the underlying segment map, never
null.
-
get
public T get(P key)
Deprecated.Gets the value of the mapping with the specified key.- Parameters:
key- the key.- Returns:
- the value of the mapping with the specified key, or
nullif no mapping for the specified key is found.
-
put
public T put(P key, T value)
Deprecated.Maps the specified key to the specified value.- Parameters:
key- the key.value- the value.- Returns:
- the value of the previous mapping with the specified key or
nullif there was no such mapping.
-
putAll
public void putAll(Map<P,T> map)
Deprecated.Copies all of the mappings from the specified map to this map.- Parameters:
map- the map to copy mappings from, may not benull.
-
remove
public T remove(P key)
Deprecated.Removes the mapping with the specified key from this map.- Parameters:
key- the key of the mapping to remove.- Returns:
- the value of the removed mapping or
nullif no mapping for the specified key was found.
-
containsKey
public boolean containsKey(P key)
Deprecated.Checks if the map contains the specified key.- Parameters:
key- the key to check.- Returns:
trueif the map contains the specified key,falseotherwise.
-
copyKeys
public List<P> copyKeys()
Deprecated.Copies keys.- Returns:
- a list containing all the keys contained in this map, never
null.
-
size
public int size()
Deprecated.Returns the number of elements in this map.- Returns:
- the number of elements in this map.
-
asMap
public Map<P,T> asMap()
Deprecated.Creates a copy of this map.- Returns:
- a
Mapcontaining all the mapping this map contains, nevernull.
-
getSegments
public Map<P,T>[] getSegments()
Deprecated.Gets underlying segment maps.- Returns:
- the underlying segment maps, never
null.
-
hashSaltValue
protected long hashSaltValue()
Deprecated.Gets hash salt value.- Returns:
- hash salt value.
-
-