NamedMapTKey, TValueGetOrAdd Method (TKey, TValue)

ScaleOut Software NamedCache API

Namespace:  Soss.Client.Concurrent
Assembly:  soss_namedcache (in soss_namedcache.dll) Version: 6.1.0.0
Syntax

public TValue GetOrAdd(
	TKey key,
	TValue value
)

Parameters

key
Type: TKey
The key of the element to add.
value
Type: TValue
The value to be added, if the key does not already exist.

Return Value

Type: TValue
The value for the key. This will be either the existing value for the key if the key is already in the map, or the new value if the key was not in the map.
Exceptions

ExceptionCondition
ArgumentNullExceptionThrown if key is a null reference.
TimeoutExceptionThrown when the maximum number of internal retries reached.
See Also

Reference