VMware Tanzu GemFire Native .NET Reference 10.2.7
Apache::Geode::Client::IRegion< TKey, TValue > Class Template Reference

Encapsulates a concrete region of cached data. More...

#include <IRegion.hpp>

Inherits System::Collections::Generic::IDictionary< TKey, TValue >.

Inherited by Apache::Geode::Client::LocalRegion< TKey, TValue >, and Apache::Geode::Client::Region< TKey, TValue >.

Public Member Functions

bool ContainsValueForKey (TKey key)
 True if the region contains a value for the given key. More...
 
IRegion< TKey, TValue > ^ CreateSubRegion (String^ subRegionName, RegionAttributes< TKey, TValue >^ attributes)
 Creates a subregion with the given name and attributes. More...
 
void DestroyRegion ()
 Destroys the whole distributed region and provides a user-defined parameter object to any ICacheWriter invoked in the process. More...
 
void DestroyRegion (Object^ callbackArg)
 Destroys the whole distributed region and provides a user-defined parameter object to any ICacheWriter invoked in the process. More...
 
bool ExistsValue (String^ predicate)
 Executes the query on the server based on the predicate and returns whether any result exists. More...
 
bool ExistsValue (String^ predicate, TimeSpan timeout)
 Executes the query on the server based on the predicate and returns whether any result exists. More...
 
TValue Get (TKey key)
 Returns the value for the given key, passing the callback argument to any cache loaders or that are invoked in the operation. More...
 
TValue Get (TKey key, Object^ callbackArg)
 Returns the value for the given key, passing the callback argument to any cache loaders or that are invoked in the operation. More...
 
void GetAll (System::Collections::Generic::ICollection< TKey >^ keys, System::Collections::Generic::IDictionary< TKey, TValue >^ values, System::Collections::Generic::IDictionary< TKey, System::Exception^>^ exceptions)
 Gets values for collection of keys from the local cache or server. More...
 
void GetAll (System::Collections::Generic::ICollection< TKey >^ keys, System::Collections::Generic::IDictionary< TKey, TValue >^ values, System::Collections::Generic::IDictionary< TKey, System::Exception^>^ exceptions, bool addToLocalCache)
 Gets values for collection of keys from the local cache or server. More...
 
void GetAll (System::Collections::Generic::ICollection< TKey >^ keys, System::Collections::Generic::IDictionary< TKey, TValue >^ values, System::Collections::Generic::IDictionary< TKey, System::Exception^>^ exceptions, bool addToLocalCache, Object^ callbackArg)
 Gets values for collection of keys from the local cache or server. More...
 
System::Collections::Generic::ICollection< Client::RegionEntry< TKey, TValue >^> ^ GetEntries (bool recursive)
 Gets the entries in this region. More...
 
Client::RegionEntry< TKey, TValue > ^ GetEntry (TKey key)
 Return the meta-object RegionEntry for the given key. More...
 
virtual System::Collections::Generic::IEnumerator< KeyValuePair< TKey, TValue > > ^ GetEnumerator ()
 Returns an enumerator that iterates through the collection of the region entries. More...
 
virtual System::Collections::IEnumerator ^ GetEnumeratorOld ()
 Returns an enumerator that iterates through the collection of the region entries. More...
 
IRegion< TKey, TValue > ^ GetLocalView ()
 Reteuns an instance of a Region<TKey, TValue> class that executes within a local scope of a process. More...
 
IRegion< TKey, TValue > ^ GetSubRegion (String^ path)
 Returns the subregion identified by the path, null if no such subregion. More...
 
ISubscriptionService< TKey > ^ GetSubscriptionService ()
 Reteuns an instance of a Region<TKey, TValue> class that implements ISubscriptionService interface This method is applicable only on distributed region & not on local region. More...
 
void Invalidate (TKey key)
 Invalidates the entry with the specified key, passing the callback argument to any cache listeners that are invoked in the operation. More...
 
void Invalidate (TKey key, Object^ callbackArg)
 Invalidates the entry with the specified key, passing the callback argument to any cache listeners that are invoked in the operation. More...
 
void InvalidateRegion ()
 Invalidates this region. More...
 
void InvalidateRegion (Object^ callbackArg)
 Invalidates this region. More...
 
void Put (TKey key, TValue value)
 Puts a new value into an entry in this region with the specified key. More...
 
void Put (TKey key, TValue value, Object^ callbackArg)
 Puts a new value into an entry in this region with the specified key, passing the callback argument to any cache writers and cache listeners that are invoked in the operation. More...
 
void PutAll (IDictionary< TKey, TValue >^ map)
 Puts a (IDictionary) generic collection of key/value pairs in this region. More...
 
void PutAll (IDictionary< TKey, TValue >^ map, TimeSpan timeout)
 Puts a (IDictionary) generic collection of key/value pairs in this region. More...
 
void PutAll (IDictionary< TKey, TValue >^ map, TimeSpan timeout, Object^ callbackArg)
 Puts a (IDictionary) generic collection of key/value pairs in this region. More...
 
template<class TResult >
ISelectResults< TResult > ^ Query (String^ predicate)
 Executes the query on the server based on the predicate. More...
 
template<class TResult >
ISelectResults< TResult > ^ Query (String^ predicate, TimeSpan timeout)
 Executes the query on the server based on the predicate. More...
 
void RemoveAll (System::Collections::Generic::ICollection< TKey >^ keys)
 Removes all of the entries for the specified keys from this region. More...
 
void RemoveAll (System::Collections::Generic::ICollection< TKey >^ keys, Object^ callbackArg)
 Removes all of the entries for the specified keys from this region. More...
 
Object ^ SelectValue (String^ predicate)
 Executes the query on the server based on the predicate and returns a single result value. More...
 
Object ^ SelectValue (String^ predicate, TimeSpan timeout)
 Executes the query on the server based on the predicate and returns a single result value. More...
 
System::Collections::Generic::ICollection< IRegion< TKey, TValue >^> ^ SubRegions (bool recursive)
 Returns the subregions of this region. More...
 

Properties

RegionAttributes< TKey, TValue >^ Attributes [get]
 Returns the attributes for this region, which can be used to create a new region with Cache.CreateRegion. More...
 
AttributesMutator< TKey, TValue >^ AttributesMutator [get]
 Return a mutator object for changing a subset of the region attributes. More...
 
virtual TValue default [TKey] [get, set]
 Gets or sets the element with the specified key. More...
 
String^ FullPath [get]
 Gets the region's full path, which can be used to get this region object with Cache.GetRegion. More...
 
bool IsDestroyed [get]
 True if this region has been destroyed. More...
 
virtual bool IsReadOnly [get]
 This property throws NotImplementedException when called by both local and distributed region instances. More...
 
virtual System::Collections::Generic::ICollection< TKey >^ Keys [get]
 Gets an ICollection containing the keys of the IDictionary Returns all the keys for this region. More...
 
String^ Name [get]
 Gets the region name. More...
 
IRegion< TKey, TValue >^ ParentRegion [get]
 Gets the parent region. More...
 
Apache::Geode::Client::IRegionServiceRegionService [get]
 Gets the RegionService for this region. More...
 
CacheStatisticsStatistics [get]
 Returns the statistics for this region. More...
 
virtual System::Collections::Generic::ICollection< TValue >^ Values [get]
 Gets an ICollection containing the values in the IDictionary. More...
 

Detailed Description

template<class TKey, class TValue>
class Apache::Geode::Client::IRegion< TKey, TValue >

Encapsulates a concrete region of cached data.

Implements generic IDictionary<TKey, TValue> interface class.

This class manages subregions and cached data. Each region can contain multiple subregions and entries for data. Regions provide a hierachical name space within the cache. Also, a region can be used to group cached objects for management purposes.

Entries managed by the region are key-value pairs. A set of region attributes is associated with the region when it is created.

The IRegion interface basically contains two set of APIs: Region management APIs and (potentially) distributed operations on entries. Non-distributed operations on entries are provided by RegionEntry.

Each Cache defines regions called the root regions. User applications can use the root regions to create subregions for isolated name spaces and object grouping.

A region's name can be any string, except that it must not contain the region name separator, a forward slash (/).

Regions can be referenced by a relative path name from any region higher in the hierarchy in IRegion.GetSubRegion. You can get the relative path from the root region with IRegion.FullPath. The name separator is used to concatenate all the region names together from the root, starting with the root's subregions.

RegionAttributes

Member Function Documentation

◆ ContainsValueForKey()

template<class TKey , class TValue >
bool Apache::Geode::Client::IRegion< TKey, TValue >::ContainsValueForKey ( TKey  key)

True if the region contains a value for the given key.

This only searches in the local cache.

<remark> For both local & distributed region instances this always searches only in local cache. </remark>

Parameters
keykey to search for
Returns
true if value is not null

◆ CreateSubRegion()

template<class TKey , class TValue >
IRegion< TKey, TValue > ^ Apache::Geode::Client::IRegion< TKey, TValue >::CreateSubRegion ( String^  subRegionName,
RegionAttributes< TKey, TValue >^  attributes 
)

Creates a subregion with the given name and attributes.

Parameters
subRegionNamenew subregion name
attributessubregion attributes
Returns
new subregion
See also
CreateServerSubRegion

◆ DestroyRegion() [1/2]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::DestroyRegion ( )

Destroys the whole distributed region and provides a user-defined parameter object to any ICacheWriter invoked in the process.

Destroy cascades to all entries and subregions. After the destroy, this region object can not be used any more. Any attempt to use this region object will get a RegionDestroyedException The region destroy not only destroys the local region but also destroys the server region. For local region instance - destroys the whole local region only For distributed region instance - destroys the whole local region and this operation is also propogated to the Geode cache server to which it is connected.

Does not update any CacheStatistics.

Exceptions
CacheWriterExceptionif a CacheWriter aborts the operation; if this occurs some subregions may have already been successfully destroyed.
CacheListenerExceptionif CacheListener throws an exception; if this occurs some subregions may have already been successfully invalidated
CacheServerExceptionIf an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedExceptionif not connected to the Geode 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.
TimeoutExceptionif the operation timed out
See also
InvalidateRegion

◆ DestroyRegion() [2/2]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::DestroyRegion ( Object^  callbackArg)

Destroys the whole distributed region and provides a user-defined parameter object to any ICacheWriter invoked in the process.

Destroy cascades to all entries and subregions. After the destroy, this region object can not be used any more. Any attempt to use this region object will get a RegionDestroyedException The region destroy not only destroys the local region but also destroys the server region. For local region instance - destroys the whole local region only For distributed region instance - destroys the whole local region and this operation is also propogated to the Geode cache server to which it is connected.

Does not update any CacheStatistics.

Parameters
callbackArga user-defined parameter to pass to callback events triggered by this call
Exceptions
CacheWriterExceptionif a CacheWriter aborts the operation; if this occurs some subregions may have already been successfully destroyed.
CacheListenerExceptionif CacheListener throws an exception; if this occurs some subregions may have already been successfully invalidated
CacheServerExceptionIf an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedExceptionif not connected to the Geode 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.
TimeoutExceptionif the operation timed out
See also
InvalidateRegion

◆ ExistsValue() [1/2]

template<class TKey , class TValue >
bool Apache::Geode::Client::IRegion< TKey, TValue >::ExistsValue ( String^  predicate)

Executes the query on the server based on the predicate and returns whether any result exists.

Valid only for a Native Client region. This method is applicable only on distributed region & not on local region.

Parameters
predicateThe query predicate (just the WHERE clause) or the entire query to execute
Exceptions
IllegalArgumentExceptionIf the predicate is empty.
IllegalStateExceptionIf some error occurred.
CacheServerExceptionIf an exception is received from the Java cache server.
NotConnectedExceptionif not connected to the Geode 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.
MessageExceptionIf 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.
QueryExceptionIf some query error occurred at the server.
TimeoutExceptionif the operation timed out
CacheClosedExceptionif the cache has been closed
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
Returns
true if the result size is non-zero, false otherwise.

◆ ExistsValue() [2/2]

template<class TKey , class TValue >
bool Apache::Geode::Client::IRegion< TKey, TValue >::ExistsValue ( String^  predicate,
TimeSpan  timeout 
)

Executes the query on the server based on the predicate and returns whether any result exists.

Valid only for a Native Client region. This method is applicable only on distributed region & not on local region.

Parameters
predicateThe query predicate (just the WHERE clause) or the entire query to execute
timeoutThe time (in seconds) to wait for the query response
Exceptions
IllegalArgumentExceptionIf the predicate is empty.
IllegalStateExceptionIf some error occurred.
CacheServerExceptionIf an exception is received from the Java cache server.
NotConnectedExceptionif not connected to the Geode 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.
MessageExceptionIf 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.
QueryExceptionIf some query error occurred at the server.
TimeoutExceptionif the operation timed out
CacheClosedExceptionif the cache has been closed
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
Returns
true if the result size is non-zero, false otherwise.

◆ Get() [1/2]

template<class TKey , class TValue >
TValue Apache::Geode::Client::IRegion< TKey, TValue >::Get ( TKey  key)

Returns the value for the given key, passing the callback argument to any cache loaders or that are invoked in the operation.


For local region instance - returns the value with the specified key from the local cache only. For distributed region instance - If the value is not present locally then it is requested from the java server. If even that is unsuccessful then a local CacheLoader will be invoked if there is one.

The value returned by get is not copied, so multi-threaded applications should not modify the value directly, but should use the update methods.

Updates the CacheStatistics.LastAccessedTime CacheStatistics.HitCount, CacheStatistics.MissCount, and CacheStatistics.LastModifiedTime (if a new value is loaded) for this region and the entry.

Parameters
keykey whose associated value is to be returned – the key object must implement the Equals and GetHashCode methods.
Returns
value, or null if the value is not found and can't be loaded
Exceptions
IllegalArgumentExceptionif key is null
CacheLoaderExceptionif CacheLoader throws an exception
CacheServerExceptionIf an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedExceptionif not connected to the Geode 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.
MessageExceptionIf 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.
TimeoutExceptionif the operation timed out
RegionDestroyedExceptionif this region has been destroyed
See also
Put

◆ Get() [2/2]

template<class TKey , class TValue >
TValue Apache::Geode::Client::IRegion< TKey, TValue >::Get ( TKey  key,
Object^  callbackArg 
)

Returns the value for the given key, passing the callback argument to any cache loaders or that are invoked in the operation.


For local region instance - returns the value with the specified key from the local cache only. For distributed region instance - If the value is not present locally then it is requested from the java server. If even that is unsuccessful then a local CacheLoader will be invoked if there is one.

The value returned by get is not copied, so multi-threaded applications should not modify the value directly, but should use the update methods.

Updates the CacheStatistics.LastAccessedTime CacheStatistics.HitCount, CacheStatistics.MissCount, and CacheStatistics.LastModifiedTime (if a new value is loaded) for this region and the entry.

Parameters
keykey whose associated value is to be returned – the key object must implement the Equals and GetHashCode methods.
callbackArgAn argument passed into the CacheLoader if loader is used. Has to be Serializable (i.e. implement ISerializable); can be null.
Returns
value, or null if the value is not found and can't be loaded
Exceptions
IllegalArgumentExceptionif key is null
CacheLoaderExceptionif CacheLoader throws an exception
CacheServerExceptionIf an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedExceptionif not connected to the Geode 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.
MessageExceptionIf 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.
TimeoutExceptionif the operation timed out
RegionDestroyedExceptionif this region has been destroyed
See also
Put

◆ GetAll() [1/3]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::GetAll ( System::Collections::Generic::ICollection< TKey >^  keys,
System::Collections::Generic::IDictionary< TKey, TValue >^  values,
System::Collections::Generic::IDictionary< TKey, System::Exception^>^  exceptions 
)

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 CacheStatistics.LastAccessedTime and CacheStatistics.HitCount and CacheStatistics.MissCount for this region and the entry.

Parameters
keysthe collection of keys
valuesoutput parameter that provides the map of keys to respective values; when this is NULL then an IllegalArgumentException is thrown.
exceptionsoutput parameter that provides the map of keys to any exceptions while obtaining the key; ignored if this is NULL
Exceptions
IllegalArgumentExceptionIf the collection of keys is null or empty, or values argument is null.
CacheServerExceptionIf an exception is received from the Java cache server while processing the request.
NotConnectedExceptionif 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.
RegionDestroyedExceptionIf region destroy is pending.
TimeoutExceptionif operation timed out.
UnknownExceptionFor other exceptions.
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
See also
Get

◆ GetAll() [2/3]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::GetAll ( System::Collections::Generic::ICollection< TKey >^  keys,
System::Collections::Generic::IDictionary< TKey, TValue >^  values,
System::Collections::Generic::IDictionary< TKey, System::Exception^>^  exceptions,
bool  addToLocalCache 
)

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 CacheStatistics.LastAccessedTime and CacheStatistics.HitCount and CacheStatistics.MissCount for this region and the entry.

Parameters
keysthe collection of keys
valuesoutput 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.
exceptionsoutput parameter that provides the map of keys to any exceptions while obtaining the key; ignored if this is NULL
addToLocalCachetrue if the obtained values have also to be added to the local cache
Exceptions
IllegalArgumentExceptionIf 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.
CacheServerExceptionIf an exception is received from the Java cache server while processing the request.
NotConnectedExceptionif 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.
RegionDestroyedExceptionIf region destroy is pending.
TimeoutExceptionif operation timed out.
UnknownExceptionFor other exceptions.
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
See also
Get

◆ GetAll() [3/3]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::GetAll ( System::Collections::Generic::ICollection< TKey >^  keys,
System::Collections::Generic::IDictionary< TKey, TValue >^  values,
System::Collections::Generic::IDictionary< TKey, System::Exception^>^  exceptions,
bool  addToLocalCache,
Object^  callbackArg 
)

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 CacheStatistics.LastAccessedTime and CacheStatistics.HitCount and CacheStatistics.MissCount for this region and the entry.

Parameters
keysthe collection of keys
valuesoutput 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.
exceptionsoutput parameter that provides the map of keys to any exceptions while obtaining the key; ignored if this is NULL
addToLocalCachetrue if the obtained values have also to be added to the local cache
callbackArga user-defined parameter to pass to callback events triggered by this method
Exceptions
IllegalArgumentExceptionIf 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.
CacheServerExceptionIf an exception is received from the Java cache server while processing the request.
NotConnectedExceptionif 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.
RegionDestroyedExceptionIf region destroy is pending.
TimeoutExceptionif operation timed out.
UnknownExceptionFor other exceptions.
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
See also
Get

◆ GetEntries()

template<class TKey , class TValue >
System::Collections::Generic::ICollection< Client::RegionEntry< TKey, TValue >^> ^ Apache::Geode::Client::IRegion< TKey, TValue >::GetEntries ( bool  recursive)

Gets the entries in this region.

For both local & distributed region instances, this operation happens in local cache only.

Parameters
recursiveif true, also return all nested subregion entries
Returns
collection of entries

◆ GetEntry()

template<class TKey , class TValue >
Client::RegionEntry< TKey, TValue > ^ Apache::Geode::Client::IRegion< TKey, TValue >::GetEntry ( TKey  key)

Return the meta-object RegionEntry for the given key.

For both local & distributed region instances, this operation happens in local cache only.

Parameters
keykey to use
Returns
region entry object
Exceptions
IllegalArgumentExceptionkey is null
RegionDestroyedExceptionregion has been destroyed

◆ GetEnumerator()

template<class TKey , class TValue >
virtual System::Collections::Generic::IEnumerator< KeyValuePair< TKey, TValue > > ^ Apache::Geode::Client::IRegion< TKey, TValue >::GetEnumerator ( )
virtual

Returns an enumerator that iterates through the collection of the region entries.

This operation is performed entirely in local cache.

The foreach statement of the C# language (for each in C++)hides the complexity of the enumerators. Therefore, using foreach is recommended, instead of directly manipulating the enumerator. Enumerators can be used to read the data in the collection, but they cannot be used to modify the underlying collection. Initially, the enumerator is positioned before the first element in the collection. At this position, Current is undefined. Therefore, you must call MoveNext to advance the enumerator to the first element of the collection before reading the value of Current. Current returns the same object until MoveNext is called. MoveNext sets Current to the next element. If MoveNext passes the end of the collection, the enumerator is positioned after the last element in the collection and MoveNext returns false. When the enumerator is at this position, subsequent calls to MoveNext also return false. If the last call to MoveNext returned false, Current is undefined. You cannot set Current to the first element of the collection again; you must create a new enumerator instance instead. The enumerator does not have exclusive access to the collection; therefore, enumerating through a collection is intrinsically not a thread-safe procedure. To guarantee thread safety during enumeration, you can lock the collection during the entire enumeration. To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization. Default implementations of collections in the System.Collections.Generic namespace are not synchronized. For both local & distributed region instances, this operation is restricted to local cache only.

Exceptions
InvalidOperationExceptionif enumerator is before or after the collection and Current method is called on it.


Returns
Type: System.Collections.Generic.IEnumerator<T>. A IEnumerator<T> that can be used to iterate through the collection.

◆ GetEnumeratorOld()

template<class TKey , class TValue >
virtual System::Collections::IEnumerator ^ Apache::Geode::Client::IRegion< TKey, TValue >::GetEnumeratorOld ( )
inlinevirtual

Returns an enumerator that iterates through the collection of the region entries.

This operation is performed entirely in local cache.

The foreach statement of the C# language (for each in C++)hides the complexity of the enumerators. Therefore, using foreach is recommended, instead of directly manipulating the enumerator. Enumerators can be used to read the data in the collection, but they cannot be used to modify the underlying collection. Initially, the enumerator is positioned before the first element in the collection. At this position, Current is undefined. Therefore, you must call MoveNext to advance the enumerator to the first element of the collection before reading the value of Current. Current returns the same object until MoveNext is called. MoveNext sets Current to the next element. If MoveNext passes the end of the collection, the enumerator is positioned after the last element in the collection and MoveNext returns false. When the enumerator is at this position, subsequent calls to MoveNext also return false. If the last call to MoveNext returned false, Current is undefined. You cannot set Current to the first element of the collection again; you must create a new enumerator instance instead. The enumerator does not have exclusive access to the collection; therefore, enumerating through a collection is intrinsically not a thread-safe procedure. To guarantee thread safety during enumeration, you can lock the collection during the entire enumeration. To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization. For both local & distributed region instances, this operation is restricted to local cache only.

Exceptions
InvalidOperationExceptionif enumerator is before or after the collection and Current method is called on it.


Returns
Type: System.Collections.IEnumerator. An IEnumerator object that can be used to iterate through the collection.

◆ GetLocalView()

template<class TKey , class TValue >
IRegion< TKey, TValue > ^ Apache::Geode::Client::IRegion< TKey, TValue >::GetLocalView ( )

Reteuns an instance of a Region<TKey, TValue> class that executes within a local scope of a process.

This method is applicable only on distributed region & not on local region.

Exceptions
NotSupportedExceptionif it is called by local region instance Region.GetLocalView

◆ GetSubRegion()

template<class TKey , class TValue >
IRegion< TKey, TValue > ^ Apache::Geode::Client::IRegion< TKey, TValue >::GetSubRegion ( String^  path)

Returns the subregion identified by the path, null if no such subregion.

Parameters
pathpath
Returns
subregion, or null if none
See also
FullPath, SubRegions, ParentRegion

◆ GetSubscriptionService()

template<class TKey , class TValue >
ISubscriptionService< TKey > ^ Apache::Geode::Client::IRegion< TKey, TValue >::GetSubscriptionService ( )

Reteuns an instance of a Region<TKey, TValue> class that implements ISubscriptionService interface This method is applicable only on distributed region & not on local region.

Exceptions
NotSupportedExceptionif it is called by local region instance Region.GetLocalView

◆ Invalidate() [1/2]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::Invalidate ( TKey  key)

Invalidates the entry with the specified key, passing the callback argument to any cache listeners that are invoked in the operation.

Invalidate only removes the value from the entry – the key is kept intact. To completely remove the entry, call Destroy.

For both local & distributed region instaces, invalidate is not propogated to the Geode cache server to which it is connected.

Does not update any CacheStatistics.

Parameters
keykey of the value to be invalidated
Exceptions
IllegalArgumentExceptionif key is null
EntryNotFoundExceptionif this entry does not exist in this region locally
RegionDestroyedExceptionif the region is destroyed
See also
Destroy, ICacheListener.AfterInvalidate

◆ Invalidate() [2/2]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::Invalidate ( TKey  key,
Object^  callbackArg 
)

Invalidates the entry with the specified key, passing the callback argument to any cache listeners that are invoked in the operation.

Invalidate only removes the value from the entry – the key is kept intact. To completely remove the entry, call Destroy.

For both local & distributed region instaces, invalidate is not propogated to the Geode cache server to which it is connected.

Does not update any CacheStatistics.

Parameters
keykey of the value to be invalidated
callbackArga user-defined parameter to pass to callback events triggered by this method
Exceptions
IllegalArgumentExceptionif key is null
EntryNotFoundExceptionif this entry does not exist in this region locally
RegionDestroyedExceptionif the region is destroyed
See also
Destroy, ICacheListener.AfterInvalidate

◆ InvalidateRegion() [1/2]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::InvalidateRegion ( )

Invalidates this region.

The invalidation will cascade to all the subregions and cached entries. The region and the entries in it will still exist. For local region instance - invalidates this region without distributing to other caches. For distributed region instance - Invalidates this region and this operation is propogated to the Geode cache server to which it is connected.


To remove all the entries and the region, use DestroyRegion.

Does not update any CacheStatistics.

Exceptions
CacheListenerExceptionif CacheListener throws an exception; if this occurs some subregions may have already been successfully invalidated
NotConnectedExceptionif not connected to the Geode 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.
RegionDestroyedExceptionif this region has been destroyed


See also
DestroyRegion, ICacheListener.AfterRegionInvalidate

◆ InvalidateRegion() [2/2]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::InvalidateRegion ( Object^  callbackArg)

Invalidates this region.

The invalidation will cascade to all the subregions and cached entries. The region and the entries in it will still exist. For local region instance - invalidates this region without distributing to other caches. For distributed region instance - Invalidates this region and this operation is propogated to the Geode cache server to which it is connected.

To remove all the entries and the region, use DestroyRegion.

Does not update any CacheStatistics.

Parameters
callbackArguser-defined parameter to pass to callback events triggered by this method
Exceptions
NotConnectedExceptionif not connected to the Geode 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.
RegionDestroyedExceptionif this region has been destroyed
CacheListenerExceptionif CacheListener throws an exception; if this occurs some subregions may have already been successfully invalidated
See also
DestroyRegion, ICacheListener.AfterRegionInvalidate

◆ Put() [1/2]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::Put ( TKey  key,
TValue  value 
)

Puts a new value into an entry in this region with the specified key.

If there is already an entry associated with the specified key in this region, the entry's previous value is overwritten. The new put value is propogated to the java server to which it is connected. Put is intended for very simple caching situations. In general it is better to create a ICacheLoader object and allow the cache to manage the creation and loading of objects. For local region instance - Puts a new value into an entry in this region in the local cache only. For distributed region instance - Puts a new value into an entry in this region and this operation is propogated to the Geode cache server to which it is connected.

Updates the CacheStatistics.LastAccessedTime and CacheStatistics.LastModifiedTime for this region and the entry.

If remote server put fails throwing back a CacheServerException or security exception, then local put is tried to rollback. However, if the entry has overflowed/evicted/expired then the rollback is aborted since it may be due to a more recent notification or update by another thread.

Parameters
keya key object associated with the value to be put into this region
valuethe value to be put into this region
Exceptions
IllegalArgumentExceptionif key is null
CacheWriterExceptionif CacheWriter aborts the operation
CacheListenerExceptionif CacheListener throws an exception
RegionDestroyedExceptionif region has been destroyed
CacheServerExceptionIf an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedExceptionif not connected to the Geode 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.
TimeoutExceptionif the operation timed out
OutOfMemoryExceptionif there is not enough memory for the value
See also
Get, Add

◆ Put() [2/2]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::Put ( TKey  key,
TValue  value,
Object^  callbackArg 
)

Puts a new value into an entry in this region with the specified key, passing the callback argument to any cache writers and cache listeners that are invoked in the operation.

If there is already an entry associated with the specified key in this region, the entry's previous value is overwritten. The new put value is propogated to the java server to which it is connected. Put is intended for very simple caching situations. In general it is better to create a ICacheLoader object and allow the cache to manage the creation and loading of objects. For local region instance - Puts a new value into an entry in this region in the local cache only. For distributed region instance - Puts a new value into an entry in this region and this operation is propogated to the Geode cache server to which it is connected.

Updates the CacheStatistics.LastAccessedTime and CacheStatistics.LastModifiedTime for this region and the entry.

If remote server put fails throwing back a CacheServerException or security exception, then local put is tried to rollback. However, if the entry has overflowed/evicted/expired then the rollback is aborted since it may be due to a more recent notification or update by another thread.

Parameters
keya key object associated with the value to be put into this region.
valuethe value to be put into this region
callbackArgargument that is passed to the callback functions
Exceptions
IllegalArgumentExceptionif key is null
CacheWriterExceptionif CacheWriter aborts the operation
CacheListenerExceptionif CacheListener throws an exception
RegionDestroyedExceptionif region has been destroyed
CacheServerExceptionIf an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedExceptionif not connected to the Geode 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.
TimeoutExceptionif the operation timed out
OutOfMemoryExceptionif there is not enough memory for the value
See also
Get, Add

◆ PutAll() [1/3]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::PutAll ( IDictionary< TKey, TValue >^  map)

Puts a (IDictionary) generic collection of key/value pairs in this region.

If there is already an entry associated with any key in the map in this region, the entry's previous value is overwritten. The new values are propogated to the java server to which it is connected. PutAll is intended for speed up large amount of put operation into the same region. For local region instance - this method is not applicable.

Parameters
mapA map contains entries, i.e. (key, value) pairs. It is generic collection of key/value pairs. Value should not be null in any of the entries.
Exceptions
NullPointerExceptionif any value in the map is null
RegionDestroyedExceptionif region has been destroyed
CacheServerExceptionIf an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedExceptionif not connected to the Geode 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.
TimeoutExceptionif the operation timed out
OutOfMemoryExceptionif there is not enough memory for the value
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
See also
Put

◆ PutAll() [2/3]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::PutAll ( IDictionary< TKey, TValue >^  map,
TimeSpan  timeout 
)

Puts a (IDictionary) generic collection of key/value pairs in this region.

If there is already an entry associated with any key in the map in this region, the entry's previous value is overwritten. The new values are propogated to the java server to which it is connected. PutAll is intended for speed up large amount of put operation into the same region. For local region instance - this method is not applicable.

Parameters
mapA map contains entries, i.e. (key, value) pairs. It is generic collection of key/value pairs. Value should not be null in any of the entries.
timeoutThe time (in seconds) to wait for the PutAll response. It should be less than or equal to 2^31/1000 i.e. 2147483. Optional.
Exceptions
IllegalArgumentExceptionIf timeout is more than 2^31/1000 i.e. 2147483.
NullPointerExceptionif any value in the map is null
RegionDestroyedExceptionif region has been destroyed
CacheServerExceptionIf an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedExceptionif not connected to the Geode 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.
TimeoutExceptionif the operation timed out
OutOfMemoryExceptionif there is not enough memory for the value
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
See also
Put

◆ PutAll() [3/3]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::PutAll ( IDictionary< TKey, TValue >^  map,
TimeSpan  timeout,
Object^  callbackArg 
)

Puts a (IDictionary) generic collection of key/value pairs in this region.

If there is already an entry associated with any key in the map in this region, the entry's previous value is overwritten. The new values are propogated to the java server to which it is connected. PutAll is intended for speed up large amount of put operation into the same region. For local region instance - this method is not applicable.

Parameters
mapA map contains entries, i.e. (key, value) pairs. It is generic collection of key/value pairs. Value should not be null in any of the entries.
timeoutThe time (in seconds) to wait for the PutAll response. It should be less than or equal to 2^31/1000 i.e. 2147483. Optional.
callbackArga user-defined parameter to pass to callback events triggered by this method
Exceptions
IllegalArgumentExceptionIf timeout is more than 2^31/1000 i.e. 2147483.
NullPointerExceptionif any value in the map is null
RegionDestroyedExceptionif region has been destroyed
CacheServerExceptionIf an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedExceptionif not connected to the Geode 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.
TimeoutExceptionif the operation timed out
OutOfMemoryExceptionif there is not enough memory for the value
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
See also
Put

◆ Query() [1/2]

template<class TKey , class TValue >
template<class TResult >
ISelectResults< TResult > ^ Apache::Geode::Client::IRegion< TKey, TValue >::Query ( String^  predicate)

Executes the query on the server based on the predicate.

Valid only for a Native Client region. This method is applicable only on distributed region & not on local region.

Parameters
predicateThe query predicate (just the WHERE clause) or the entire query to execute
Exceptions
IllegalArgumentExceptionIf the predicate is empty.
IllegalStateExceptionIf some error occurred.
CacheServerExceptionIf an exception is received from the Java cache server.
NotConnectedExceptionif not connected to the Geode 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.
MessageExceptionIf 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.
QueryExceptionIf some query error occurred at the server.
TimeoutExceptionif the operation timed out
CacheClosedExceptionif the cache has been closed
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
Returns
The SelectResults which can either be a ResultSet or a StructSet.

◆ Query() [2/2]

template<class TKey , class TValue >
template<class TResult >
ISelectResults< TResult > ^ Apache::Geode::Client::IRegion< TKey, TValue >::Query ( String^  predicate,
TimeSpan  timeout 
)

Executes the query on the server based on the predicate.

Valid only for a Native Client region. This method is applicable only on distributed region & not on local region.

Parameters
predicateThe query predicate (just the WHERE clause) or the entire query to execute
timeoutThe time (in seconds) to wait for the query response, optional
Exceptions
IllegalArgumentExceptionIf the predicate is empty.
IllegalStateExceptionIf some error occurred.
CacheServerExceptionIf an exception is received from the Java cache server.
NotConnectedExceptionif not connected to the Geode 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.
MessageExceptionIf 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.
QueryExceptionIf some query error occurred at the server.
TimeoutExceptionif the operation timed out
CacheClosedExceptionif the cache has been closed
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
Returns
The SelectResults which can either be a ResultSet or a StructSet.

◆ RemoveAll() [1/2]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::RemoveAll ( System::Collections::Generic::ICollection< TKey >^  keys)

Removes all of the entries for the specified keys from this region.

The effect of this call is equivalent to that of calling destroy(Object) on this region once for each key in the specified collection. If an entry does not exist that key is skipped; EntryNotFoundException is not thrown. For local region instance - this method is not applicable. Updates the CacheStatistics.LastAccessedTime and CacheStatistics.HitCount and CacheStatistics.MissCount for this region and the entry.

Parameters
keysthe collection of keys
Exceptions
IllegalArgumentExceptionIf the collection of keys is null or empty.
CacheServerExceptionIf an exception is received from the Java cache server while processing the request.
NotConnectedExceptionif 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.
RegionDestroyedExceptionIf region destroy is pending.
TimeoutExceptionif operation timed out.
UnknownExceptionFor other exceptions.
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
See also
Get

◆ RemoveAll() [2/2]

template<class TKey , class TValue >
void Apache::Geode::Client::IRegion< TKey, TValue >::RemoveAll ( System::Collections::Generic::ICollection< TKey >^  keys,
Object^  callbackArg 
)

Removes all of the entries for the specified keys from this region.

The effect of this call is equivalent to that of calling remove(Object) on this region once for each key in the specified collection. If an entry does not exist that key is skipped; EntryNotFoundException is not thrown. For local region instance - this method is not applicable. Updates the CacheStatistics.LastAccessedTime and CacheStatistics.HitCount and CacheStatistics.MissCount for this region and the entry.

Parameters
keysthe collection of keys
callbackArgan argument that is passed to the callback functions. Optional.
Exceptions
IllegalArgumentExceptionIf the collection of keys is null or empty.
CacheServerExceptionIf an exception is received from the Java cache server while processing the request.
NotConnectedExceptionif 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.
RegionDestroyedExceptionIf region destroy is pending.
TimeoutExceptionif operation timed out.
UnknownExceptionFor other exceptions.
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
See also
Remove

◆ SelectValue() [1/2]

template<class TKey , class TValue >
Object ^ Apache::Geode::Client::IRegion< TKey, TValue >::SelectValue ( String^  predicate)

Executes the query on the server based on the predicate and returns a single result value.

Valid only for a Native Client region. This method is applicable only on distributed region & not on local region.

Parameters
predicateThe query predicate (just the WHERE clause) or the entire query to execute
Exceptions
IllegalArgumentExceptionIf the predicate is empty.
IllegalStateExceptionIf some error occurred.
CacheServerExceptionIf an exception is received from the Java cache server.
NotConnectedExceptionif not connected to the Geode 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.
MessageExceptionIf 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.
QueryExceptionIf some query error occurred at the server, or more than one result items are available.
TimeoutExceptionif the operation timed out
CacheClosedExceptionif the cache has been closed
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
Returns
The single ResultSet or StructSet item, or NULL of no results are available.

◆ SelectValue() [2/2]

template<class TKey , class TValue >
Object ^ Apache::Geode::Client::IRegion< TKey, TValue >::SelectValue ( String^  predicate,
TimeSpan  timeout 
)

Executes the query on the server based on the predicate and returns a single result value.

Valid only for a Native Client region. This method is applicable only on distributed region & not on local region.

Parameters
predicateThe query predicate (just the WHERE clause) or the entire query to execute
timeoutThe time (in seconds) to wait for the query response
Exceptions
IllegalArgumentExceptionIf the predicate is empty.
IllegalStateExceptionIf some error occurred.
CacheServerExceptionIf an exception is received from the Java cache server.
NotConnectedExceptionif not connected to the Geode 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.
MessageExceptionIf 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.
QueryExceptionIf some query error occurred at the server, or more than one result items are available.
TimeoutExceptionif the operation timed out
CacheClosedExceptionif the cache has been closed
NotSupportedExceptionif it is called by local region instance Region.GetLocalView
Returns
The single ResultSet or StructSet item, or NULL of no results are available.

◆ SubRegions()

template<class TKey , class TValue >
System::Collections::Generic::ICollection< IRegion< TKey, TValue >^> ^ Apache::Geode::Client::IRegion< TKey, TValue >::SubRegions ( bool  recursive)

Returns the subregions of this region.

Parameters
recursiveif true, also return all nested subregions
Returns
collection of regions
Exceptions
RegionDestroyedExceptionthis region has already been destroyed

Property Documentation

◆ Attributes

template<class TKey , class TValue >
RegionAttributes< TKey, TValue>^ Apache::Geode::Client::IRegion< TKey, TValue >::Attributes
get

Returns the attributes for this region, which can be used to create a new region with Cache.CreateRegion.

Returns
region's attributes

◆ AttributesMutator

template<class TKey , class TValue >
AttributesMutator< TKey, TValue>^ Apache::Geode::Client::IRegion< TKey, TValue >::AttributesMutator
get

Return a mutator object for changing a subset of the region attributes.

Returns
attribute mutator
Exceptions
RegionDestroyedExceptionif the region has been destroyed

◆ default

template<class TKey , class TValue >
virtual TValue Apache::Geode::Client::IRegion< TKey, TValue >::default[TKey]
getset

Gets or sets the element with the specified key.

This property provides the ability to access a specific element in the collection by using the following syntax: myCollection[key]. You can also use the Item property to add new elements by setting the value of a key that does not exist in the dictionary; for example, myCollection["myNonexistentKey"] = myValue However, if the specified key already exists in the dictionary, setting the Item property overwrites the old value. In contrast, the Add method does not modify existing elements. This property is applicable to local as well as distributed region. For local region instance - Puts/Gets a new value into an entry in this region in the local cache only. For distributed region instance - Puts/Gets a new value into an entry in this region and this operation is propogated to the Geode cache server to which it is connected.

Parameters
keyThe key of the element to get or set.
Property ValueThe element with the specified key.
Exceptions
IllegalArgumentExceptionif key is null
KeyNotFoundExceptionIf given key was not present in the region and if region is not in secure mode, or if Pool attached with Region is not in multiusersecure mode.
EntryNotFoundExceptionif given key's value is null.
CacheWriterExceptionif CacheWriter aborts the operation
CacheListenerExceptionif CacheListener throws an exception
RegionDestroyedExceptionif region has been destroyed
CacheServerExceptionIf an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedExceptionif not connected to the Geode 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.
TimeoutExceptionif the operation timed out
OutOfMemoryExceptionif there is not enough memory for the value
CacheLoaderExceptionif CacheLoader throws an exception
MessageExceptionIf 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.

◆ FullPath

template<class TKey , class TValue >
String^ Apache::Geode::Client::IRegion< TKey, TValue >::FullPath
get

Gets the region's full path, which can be used to get this region object with Cache.GetRegion.

Returns
region's pathname

◆ IsDestroyed

template<class TKey , class TValue >
bool Apache::Geode::Client::IRegion< TKey, TValue >::IsDestroyed
get

True if this region has been destroyed.

Returns
true if destroyed

◆ IsReadOnly

template<class TKey , class TValue >
virtual bool Apache::Geode::Client::IRegion< TKey, TValue >::IsReadOnly
get

This property throws NotImplementedException when called by both local and distributed region instances.

◆ Keys

template<class TKey , class TValue >
virtual System:: Collections:: Generic:: ICollection< TKey>^ Apache::Geode::Client::IRegion< TKey, TValue >::Keys
get

Gets an ICollection containing the keys of the IDictionary Returns all the keys for this region.

This includes keys for which the entry is invalid. For local region instance - gets collection of keys from local cache only. For distributed region instance - gets collection of keys from the Geode cache server.

Returns
collection of keys

<remark> The order of the keys in the returned ICollection is unspecified, but it is guaranteed to be the same order as the corresponding values in the ICollection returned by the Values property. </remark>

Exceptions
UnsupportedOperationExceptionif the member type is not Client or region is not a Native Client region.
CacheServerExceptionIf an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedExceptionif not connected to the Geode 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.
MessageExceptionIf 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.
TimeoutExceptionif there is a timeout getting the keys

◆ Name

template<class TKey , class TValue >
String^ Apache::Geode::Client::IRegion< TKey, TValue >::Name
get

Gets the region name.

Returns
region's name

◆ ParentRegion

template<class TKey , class TValue >
IRegion< TKey, TValue>^ Apache::Geode::Client::IRegion< TKey, TValue >::ParentRegion
get

Gets the parent region.

Returns
region's parent, if any, or null if this is a root region
Exceptions
RegionDestroyedExceptionif the region has been destroyed

◆ RegionService

template<class TKey , class TValue >
Apache:: Geode:: Client:: IRegionService^ Apache::Geode::Client::IRegion< TKey, TValue >::RegionService
get

Gets the RegionService for this region.

Returns
RegionService

◆ Statistics

template<class TKey , class TValue >
CacheStatistics^ Apache::Geode::Client::IRegion< TKey, TValue >::Statistics
get

Returns the statistics for this region.

Returns
the CacheStatistics for this region
Exceptions
StatisticsDisabledExceptionif statistics have been disabled for this region

◆ Values

template<class TKey , class TValue >
virtual System:: Collections:: Generic:: ICollection< TValue>^ Apache::Geode::Client::IRegion< TKey, TValue >::Values
get

Gets an ICollection containing the values in the IDictionary.

Returns all values in the local process for this region. No value is included for entries that are invalidated. For both local & distributed region instances, this operation is always local only.

Returns
collection of values

<remark> The order of the values in the returned ICollection is unspecified, but it is guaranteed to be the same order as the corresponding keys in the ICollection returned by the Keys property. </remark>


Apache Geode C++ Cache .NET API Documentation