IRegion TKey, TValue  GetAll Method (ICollection TKey , IDictionary TKey, TValue , IDictionary TKey, Exception , Boolean)Pivotal GemFire .NET Client Documentation
Gets values for collection of keys from the local cache or server. If value for a key is not present locally then it is requested from the java server. The value returned is not copied, so multi-threaded applications should not modify the value directly, but should use the update methods. For local region instance - this method is not applicable. Updates the LastAccessedTime and [!:CacheStatistics.HitCount] and [!:CacheStatistics.MissCount] for this region and the entry.

Namespace: GemStone.GemFire.Cache.Generic
Assembly: GemStone.GemFire.Cache (in GemStone.GemFire.Cache.dll) Version: 8.0.0.0
Syntax

void GetAll(
	ICollection<TKey> keys,
	IDictionary<TKey, TValue> values,
	IDictionary<TKey, Exception> exceptions,
	bool addToLocalCache
)

Parameters

keys
Type: System.Collections.Generic ICollection TKey 
the collection of keys
values
Type: System.Collections.Generic IDictionary TKey, TValue 
output parameter that provides the map of keys to respective values; ignored if NULL; when this is NULL then at least the addToLocalCache parameter should be true and caching should be enabled for the region to get values into the region otherwise an IllegalArgumentException is thrown.
exceptions
Type: System.Collections.Generic IDictionary TKey, Exception 
output parameter that provides the map of keys to any exceptions while obtaining the key; ignored if this is NULL
addToLocalCache
Type: System Boolean
true if the obtained values have also to be added to the local cache
Exceptions

ExceptionCondition
[!:IllegalArgumentException] If the collection of keys is null or empty. Other invalid case is when the values parameter is NULL, and either addToLocalCache is false or caching is disabled for this region.
[!:CacheServerException] If an exception is received from the Java cache server while processing the request.
[!:NotConnectedException] if region is not connected to the cache because the client cannot establish usable connections to any of the given servers For pools configured with locators, if no locators are available, innerException of NotConnectedException is set to NoAvailableLocatorsException.
[!:RegionDestroyedException] If region destroy is pending.
System TimeoutException if operation timed out.
[!:UnknownException] For other exceptions.
System NotSupportedException if it is called by local region instance [!:Region.GetLocalView]
See Also