IRegionTKey, TValueTryGetValue Method |
Gets the value associated with the specified key.
Namespace: GemStone.GemFire.Cache.GenericAssembly: Gemstone.Gemfire.Cache (in Gemstone.Gemfire.Cache.dll) Version: 9.0.6.18
Syntaxbool TryGetValue(
TKey key,
ref TValue value
)
Function TryGetValue (
key As TKey,
ByRef value As TValue
) As Boolean
bool TryGetValue(
TKey key,
TValue% value
)
abstract TryGetValue :
key : 'TKey *
value : 'TValue byref -> bool
Parameters
- key
- Type: TKey
The key whose value to get.
- value
- Type: TValue
When this method returns, the value associated with the specified key, if the key is
found; otherwise, the default value for the type of the value parameter.
This parameter is passed uninitialized.
Return Value
Type:
Boolean
true if the object that implements IDictionary contains an element with the specified key; otherwise, false.
Implements
IDictionaryTKey, TValueTryGetValue(TKey, TValue)
ExceptionsException | Condition |
---|
IllegalArgumentException |
if key is null
|
CacheLoaderException |
if CacheLoader throws an exception
|
CacheServerException |
If an exception is received from the Java cache server.
Only for Native Client regions.
|
NotConnectedException |
if not connected to the GemFire system because the client cannot
establish usable connections to any of the servers given to it.
For pools configured with locators, if no locators are available, innerException
of NotConnectedException is set to NoAvailableLocatorsException.
|
MessageException |
If the message received from server could not be handled. This will
be the case when an unregistered typeId is received in the reply or
reply is not well formed. More information can be found in the log.
|
TimeoutException |
if the operation timed out
|
RegionDestroyedException |
if this region has been destroyed
|
See Also