GemStone::GemFire::Cache::Region Class Reference


Detailed Description

Encapsulates a concrete region of cached data.

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 Region 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 Region.GetSubRegion. You can get the relative path from the root region with Region.FullPath. The name separator is used to concatenate all the region names together from the root, starting with the root's subregions.

RegionAttributes

Public Member Functions

Boolean ContainsKey (CacheableKey^ key)
Boolean ContainsKey (ICacheableKey^ key)
Boolean ContainsValueForKey (CacheableKey^ key)
Boolean ContainsValueForKey (ICacheableKey^ key)
void Create (CacheableKey^ key, Serializable^ value)
void Create (ICacheableKey^ key, Serializable^ value)
void Create (CacheableKey^ key, IGFSerializable^ value)
void Create (ICacheableKey^ key, IGFSerializable^ value)
void Create (CacheableKey^ key, Serializable^ value, IGFSerializable^ cacheWriterArg)
void Create (ICacheableKey^ key, Serializable^ value, IGFSerializable^ cacheWriterArg)
void Create (CacheableKey^ key, IGFSerializable^ value, IGFSerializable^ cacheWriterArg)
void Create (ICacheableKey^ key, IGFSerializable^ value, IGFSerializable^ cacheWriterArg)
void CreateServerSubRegion (String^ regionName, RegionAttributes^ attributes)
 This functionality is unsupported in the Native Client Product.
RegionCreateSubRegion (String^ subRegionName, RegionAttributes^ attributes)
void Destroy (CacheableKey^ key)
void Destroy (ICacheableKey^ key)
void Destroy (CacheableKey^ key, IGFSerializable^ cacheWriterArg)
void Destroy (ICacheableKey^ key, IGFSerializable^ cacheWriterArg)
void DestroyRegion ()
void DestroyRegion (IGFSerializable^ callback)
void DestroyServerSubRegion (String^ regionName)
 This functionality is unsupported in the Native Client Product.
Boolean ExistsValue (String^ predicate)
Boolean ExistsValue (String^ predicate, UInt32 timeout)
IGFSerializableGet (CacheableKey^ key)
IGFSerializableGet (ICacheableKey^ key)
IGFSerializableGet (CacheableKey^ key, IGFSerializable^ callback)
IGFSerializableGet (ICacheableKey^ key, IGFSerializable^ callback)
AttributesMutatorGetAttributesMutator ()
array< RegionEntry^ >^ GetEntries (Boolean recursive)
RegionEntryGetEntry (CacheableKey^ key)
RegionEntryGetEntry (ICacheableKey^ key)
array< MemberId^ >^ GetInterestList (CacheableKey^ key)
 This functionality is unsupported in the Native Client Product.
array< MemberId^ >^ GetInterestList (ICacheableKey^ key)
 This functionality is unsupported in the Native Client Product.
array< ICacheableKey^ >^ GetKeys ()
array< ICacheableKey^ >^ GetServerKeys ()
RegionGetSubRegion (String^ path)
array
< IGFSerializable^ >^ 
GetValues ()
void Invalidate (CacheableKey^ key)
void Invalidate (ICacheableKey^ key)
void Invalidate (CacheableKey^ key, IGFSerializable^ callback)
void Invalidate (ICacheableKey^ key, IGFSerializable^ callback)
void InvalidateRegion ()
void InvalidateRegion (IGFSerializable^ callback)
void LocalDestroy (CacheableKey^ key)
void LocalDestroy (ICacheableKey^ key)
void LocalDestroy (CacheableKey^ key, IGFSerializable^ cacheListenerArg)
void LocalDestroy (ICacheableKey^ key, IGFSerializable^ cacheListenerArg)
void LocalDestroyRegion ()
void LocalDestroyRegion (IGFSerializable^ callback)
void LocalInvalidate (CacheableKey^ key)
void LocalInvalidate (ICacheableKey^ key)
void LocalInvalidate (CacheableKey^ key, IGFSerializable^ callback)
void LocalInvalidate (ICacheableKey^ key, IGFSerializable^ callback)
void LocalInvalidateRegion ()
void LocalInvalidateRegion (IGFSerializable^ callback)
void Put (CacheableKey^ key, Serializable^ value)
void Put (ICacheableKey^ key, Serializable^ value)
void Put (CacheableKey^ key, IGFSerializable^ value)
void Put (ICacheableKey^ key, IGFSerializable^ value)
void Put (CacheableKey^ key, Serializable^ value, IGFSerializable^ callback)
void Put (ICacheableKey^ key, Serializable^ value, IGFSerializable^ callback)
void Put (CacheableKey^ key, IGFSerializable^ value, IGFSerializable^ callback)
void Put (ICacheableKey^ key, IGFSerializable^ value, IGFSerializable^ callback)
ISelectResultsQuery (String^ predicate)
ISelectResultsQuery (String^ predicate, UInt32 timeout)
void RegisterAllKeys (Boolean isDurable)
void RegisterAllKeys ()
void RegisterKeys (array< CacheableKey^ >^keys, IGFSerializable^ callback, Boolean isDurable)
void RegisterKeys (array< CacheableKey^ >^keys, IGFSerializable^ callback)
void RegisterKeys (array< CacheableKey^ >^keys)
void RegisterKeys (array< ICacheableKey^ >^keys, IGFSerializable^ callback, Boolean isDurable)
void RegisterKeys (array< ICacheableKey^ >^keys, IGFSerializable^ callback)
void RegisterKeys (array< ICacheableKey^ >^keys)
void RegisterRegex (String^ regex, Boolean isDurable)
void RegisterRegex (String^ regex)
IGFSerializableSelectValue (String^ predicate)
IGFSerializableSelectValue (String^ predicate, UInt32 timeout)
array< Region^ >^ SubRegions (Boolean recursive)
void UnregisterAllKeys ()
void UnregisterKeys (array< CacheableKey^ >^keys, IGFSerializable^ callback)
void UnregisterKeys (array< CacheableKey^ >^keys)
void UnregisterKeys (array< ICacheableKey^ >^keys, IGFSerializable^ callback)
void UnregisterKeys (array< ICacheableKey^ >^keys)
void UnregisterRegex (String^ regex)

Properties

RegionAttributes^  Attributes [get]
Cache^  Cache [get]
String^  FullPath [get]
Boolean IsDestroyed [get]
String^  Name [get]
Region^  ParentRegion [get]
UInt32 PeerCount [get]
 This functionality is unsupported in the Native Client Product.
CacheStatistics^  Statistics [get]


Member Function Documentation

Boolean GemStone::GemFire::Cache::Region::ContainsKey ( CacheableKey^   key  ) 

True if the region contains the given key. This only searches in the local cache.

Parameters:
key key to search for
Returns:
true if contained

Boolean GemStone::GemFire::Cache::Region::ContainsKey ( ICacheableKey^   key  ) 

True if the region contains the given key. This only searches in the local cache.

Parameters:
key key to search for
Returns:
true if contained

Boolean GemStone::GemFire::Cache::Region::ContainsValueForKey ( CacheableKey^   key  ) 

True if the region contains a value for the given key. This only searches in the local cache.

Parameters:
key key to search for
Returns:
true if value is not null

Boolean GemStone::GemFire::Cache::Region::ContainsValueForKey ( ICacheableKey^   key  ) 

True if the region contains a value for the given key. This only searches in the local cache.

Parameters:
key key to search for
Returns:
true if value is not null

void GemStone::GemFire::Cache::Region::Create ( CacheableKey^   key,
Serializable^   value 
) [inline]

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

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

The new entry is propogated to the java server to which it is connected with.

Parameters:
key The key for which to create the entry in this region. The object is created before the call, and the caller should not deallocate the object.
value The value for the new entry, which may be null to indicate that the new entry starts as if it had been locally invalidated.
Exceptions:
IllegalArgumentException if key is null

Exceptions:
CacheServerException If an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedException if not connected to a GemFire system because the client cannot establish usable connections to any of the servers given to it.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the new entry
EntryExistsException if an entry with this key already exists
See also:
Put, Get

void GemStone::GemFire::Cache::Region::Create ( ICacheableKey^   key,
Serializable^   value 
) [inline]

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

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

The new entry is propogated to the java server to which it is connected with.

Parameters:
key The key for which to create the entry in this region. The object is created before the call, and the caller should not deallocate the object.
value The value for the new entry, which may be null to indicate that the new entry starts as if it had been locally invalidated.
Exceptions:
IllegalArgumentException if key is null

Exceptions:
CacheServerException If an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedException if not connected to a GemFire system because the client cannot establish usable connections to any of the servers given to it.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the new entry
EntryExistsException if an entry with this key already exists
See also:
Put, Get

void GemStone::GemFire::Cache::Region::Create ( CacheableKey^   key,
IGFSerializable^   value 
) [inline]

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

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

The new entry is propogated to the java server to which it is connected with.

Parameters:
key The key for which to create the entry in this region. The object is created before the call, and the caller should not deallocate the object.
value The value for the new entry, which may be null to indicate that the new entry starts as if it had been locally invalidated.
Exceptions:
IllegalArgumentException if key is null

Exceptions:
CacheServerException If an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedException if not connected to a GemFire system because the client cannot establish usable connections to any of the servers given to it.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the new entry
EntryExistsException if an entry with this key already exists
See also:
Put, Get

void GemStone::GemFire::Cache::Region::Create ( ICacheableKey^   key,
IGFSerializable^   value 
) [inline]

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

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

The new entry is propogated to the java server to which it is connected with.

Parameters:
key The key for which to create the entry in this region. The object is created before the call, and the caller should not deallocate the object.
value The value for the new entry, which may be null to indicate that the new entry starts as if it had been locally invalidated.
Exceptions:
IllegalArgumentException if key is null

Exceptions:
CacheServerException If an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedException if not connected to a GemFire system because the client cannot establish usable connections to any of the servers given to it.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the new entry
EntryExistsException if an entry with this key already exists
See also:
Put, Get

void GemStone::GemFire::Cache::Region::Create ( CacheableKey^   key,
Serializable^   value,
IGFSerializable^   cacheWriterArg 
)

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

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

The new entry is propogated to the java server to which it is connected with.

Parameters:
key The key for which to create the entry in this region. The object is created before the call, and the caller should not deallocate the object.
value The value for the new entry, which may be null to indicate that the new entry starts as if it had been locally invalidated.
cacheWriterArg a user-defined parameter to pass to the CacheWriter
Exceptions:
IllegalArgumentException if key is null

Exceptions:
CacheServerException If an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedException if not connected to a GemFire system because the client cannot establish usable connections to any of the servers given to it.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the new entry
EntryExistsException if an entry with this key already exists
See also:
Put, Get

void GemStone::GemFire::Cache::Region::Create ( ICacheableKey^   key,
Serializable^   value,
IGFSerializable^   cacheWriterArg 
)

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

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

The new entry is propogated to the java server to which it is connected with.

Parameters:
key The key for which to create the entry in this region. The object is created before the call, and the caller should not deallocate the object.
value The value for the new entry, which may be null to indicate that the new entry starts as if it had been locally invalidated.
cacheWriterArg a user-defined parameter to pass to the CacheWriter
Exceptions:
IllegalArgumentException if key is null

Exceptions:
CacheServerException If an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedException if not connected to a GemFire system because the client cannot establish usable connections to any of the servers given to it.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the new entry
EntryExistsException if an entry with this key already exists
See also:
Put, Get

void GemStone::GemFire::Cache::Region::Create ( CacheableKey^   key,
IGFSerializable^   value,
IGFSerializable^   cacheWriterArg 
)

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

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

The new entry is propogated to the java server to which it is connected with.

Parameters:
key The key for which to create the entry in this region. The object is created before the call, and the caller should not deallocate the object.
value The value for the new entry, which may be null to indicate that the new entry starts as if it had been locally invalidated.
cacheWriterArg a user-defined parameter to pass to the CacheWriter
Exceptions:
IllegalArgumentException if key is null

Exceptions:
CacheServerException If an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedException if not connected to a GemFire system because the client cannot establish usable connections to any of the servers given to it.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the new entry
EntryExistsException if an entry with this key already exists
See also:
Put, Get

void GemStone::GemFire::Cache::Region::Create ( ICacheableKey^   key,
IGFSerializable^   value,
IGFSerializable^   cacheWriterArg 
)

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

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

The new entry is propogated to the java server to which it is connected with.

Parameters:
key The key for which to create the entry in this region. The object is created before the call, and the caller should not deallocate the object.
value The value for the new entry, which may be null to indicate that the new entry starts as if it had been locally invalidated.
cacheWriterArg a user-defined parameter to pass to the CacheWriter
Exceptions:
IllegalArgumentException if key is null

Exceptions:
CacheServerException If an exception is received from the Java cache server. Only for Native Client regions.
NotConnectedException if not connected to a GemFire system because the client cannot establish usable connections to any of the servers given to it.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the new entry
EntryExistsException if an entry with this key already exists
See also:
Put, Get

void GemStone::GemFire::Cache::Region::CreateServerSubRegion ( String^   regionName,
RegionAttributes^   attributes 
)

This functionality is unsupported in the Native Client Product.

Region ^ GemStone::GemFire::Cache::Region::CreateSubRegion ( String^   subRegionName,
RegionAttributes^   attributes 
)

Creates a subregion with the given name and attributes.

Parameters:
subRegionName new subregion name
attributes subregion attributes
Returns:
new subregion
See also:
CreateServerSubRegion

void GemStone::GemFire::Cache::Region::Destroy ( CacheableKey^   key  )  [inline]

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

Destroy removes not only the value, but also the key and entry from this region.

The destroy is propogated to the Gemfire cache server to which it is connected with.

Does not update any CacheStatistics.

Parameters:
key the key of the entry to destroy
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.

Exceptions:
EntryNotFoundException if the entry does not exist in this region locally
TimeoutException if the operation timed out
RegionDestroyedException if this region has been destroyed
See also:
LocalDestroy, Invalidate, ICacheListener.AfterDestroy, ICacheWriter.BeforeDestroy

void GemStone::GemFire::Cache::Region::Destroy ( ICacheableKey^   key  )  [inline]

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

Destroy removes not only the value, but also the key and entry from this region.

The destroy is propogated to the Gemfire cache server to which it is connected with.

Does not update any CacheStatistics.

Parameters:
key the key of the entry to destroy
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.

Exceptions:
EntryNotFoundException if the entry does not exist in this region locally
TimeoutException if the operation timed out
RegionDestroyedException if this region has been destroyed
See also:
LocalDestroy, Invalidate, ICacheListener.AfterDestroy, ICacheWriter.BeforeDestroy

void GemStone::GemFire::Cache::Region::Destroy ( CacheableKey^   key,
IGFSerializable^   cacheWriterArg 
)

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

Destroy removes not only the value, but also the key and entry from this region.

The destroy is propogated to the Gemfire cache server to which it is connected with.

Does not update any CacheStatistics.

Parameters:
key the key of the entry to destroy
cacheWriterArg a user-defined parameter to pass to cache writers triggered by this method
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.

Exceptions:
EntryNotFoundException if the entry does not exist in this region locally
TimeoutException if the operation timed out
RegionDestroyedException if this region has been destroyed
See also:
LocalDestroy, Invalidate, ICacheListener.AfterDestroy, ICacheWriter.BeforeDestroy

void GemStone::GemFire::Cache::Region::Destroy ( ICacheableKey^   key,
IGFSerializable^   cacheWriterArg 
)

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

Destroy removes not only the value, but also the key and entry from this region.

The destroy is propogated to the Gemfire cache server to which it is connected with.

Does not update any CacheStatistics.

Parameters:
key the key of the entry to destroy
cacheWriterArg a user-defined parameter to pass to cache writers triggered by this method
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.

Exceptions:
EntryNotFoundException if the entry does not exist in this region locally
TimeoutException if the operation timed out
RegionDestroyedException if this region has been destroyed
See also:
LocalDestroy, Invalidate, ICacheListener.AfterDestroy, ICacheWriter.BeforeDestroy

void GemStone::GemFire::Cache::Region::DestroyRegion (  )  [inline]

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.

Does not update any CacheStatistics.

Exceptions:
CacheWriterException if a CacheWriter aborts the operation; if this occurs some subregions may have already been successfully destroyed.

Exceptions:
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.

Exceptions:
TimeoutException if the operation timed out
See also:
InvalidateRegion

void GemStone::GemFire::Cache::Region::DestroyRegion ( IGFSerializable^   callback  ) 

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.

Does not update any CacheStatistics.

Parameters:
callback a user-defined parameter to pass to callback events triggered by this call
Exceptions:
CacheWriterException if a CacheWriter aborts the operation; if this occurs some subregions may have already been successfully destroyed.

Exceptions:
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.

Exceptions:
TimeoutException if the operation timed out
See also:
InvalidateRegion

void GemStone::GemFire::Cache::Region::DestroyServerSubRegion ( String^   regionName  ) 

This functionality is unsupported in the Native Client Product.

Boolean GemStone::GemFire::Cache::Region::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.

Parameters:
predicate The query predicate (just the WHERE clause) or the entire query to execute
Exceptions:
IllegalArgumentException If the predicate is empty.
IllegalStateException If some error occurred.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
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.
QueryException If some query error occurred at the server.
TimeoutException if the operation timed out
CacheClosedException if the cache has been closed
Returns:
true if the result size is non-zero, false otherwise.

Boolean GemStone::GemFire::Cache::Region::ExistsValue ( String^   predicate,
UInt32  timeout 
)

Executes the query on the server based on the predicate and returns whether any result exists. Valid only for a Native Client region.

Parameters:
predicate The query predicate (just the WHERE clause) or the entire query to execute
timeout The time (in seconds) to wait for the query response
Exceptions:
IllegalArgumentException If the predicate is empty.
IllegalStateException If some error occurred.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
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.
QueryException If some query error occurred at the server.
TimeoutException if the operation timed out
CacheClosedException if the cache has been closed
Returns:
true if the result size is non-zero, false otherwise.

IGFSerializable ^ GemStone::GemFire::Cache::Region::Get ( CacheableKey^   key  )  [inline]

Returns the value for the given key.

If the value is not present locally for this entry, then it is requested from the java server. If even that is unsuccessful then a local CacheLoader will be invoked if there is one.

If any of these methods successfully retrieves a value, then the value is immediately returned.

netSearch and netLoad are never performed more than once. If a loader attempts a second netSearch, it will not be done.

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, and CacheStatistics.LastModifiedTime (if a new value is loaded) for this region and the entry.

If an ICacheWriter throws a CacheWriterException when a new value is retrieved from a loader, then the value will not be put into the cache (a new entry will not be created) but the get will return the value and not propagate the exception.

Parameters:
key key whose associated value is to be returned -- the key object must implement the equals and hashcode methods.
Returns:
value, or null if the value is not found and can't be loaded
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.
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.

Exceptions:
TimeoutException if the operation timed out
RegionDestroyedException if this region has been destroyed
See also:
Put

IGFSerializable ^ GemStone::GemFire::Cache::Region::Get ( ICacheableKey^   key  )  [inline]

Returns the value for the given key.

If the value is not present locally for this entry, then it is requested from the java server. If even that is unsuccessful then a local CacheLoader will be invoked if there is one.

If any of these methods successfully retrieves a value, then the value is immediately returned.

netSearch and netLoad are never performed more than once. If a loader attempts a second netSearch, it will not be done.

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, and CacheStatistics.LastModifiedTime (if a new value is loaded) for this region and the entry.

If an ICacheWriter throws a CacheWriterException when a new value is retrieved from a loader, then the value will not be put into the cache (a new entry will not be created) but the get will return the value and not propagate the exception.

Parameters:
key key whose associated value is to be returned -- the key object must implement the equals and hashcode methods.
Returns:
value, or null if the value is not found and can't be loaded
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.
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.

Exceptions:
TimeoutException if the operation timed out
RegionDestroyedException if this region has been destroyed
See also:
Put

IGFSerializable ^ GemStone::GemFire::Cache::Region::Get ( CacheableKey^   key,
IGFSerializable^   callback 
)

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

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, and CacheStatistics.LastModifiedTime (if a new value is loaded) for this region and the entry.

If an ICacheWriter throws a CacheWriterException when a new value is retrieved from a loader, then the value will not be put into the cache (a new entry will not be created) but the get will return the value and not propagate the exception.

Parameters:
key key whose associated value is to be returned -- the key object must implement the equals and hashcode methods.
callback An argument passed into the CacheLoader if loader is used -- will also be subsequently passed to a CacheWriter if the loader returns a non-null value to be placed in the cache. Modifications to this argument made in the CacheLoader will be visible to the CacheWriter, even if the loader and the writer are installed in different cache processes. Can be null.
Returns:
value, or null if the value is not found and can't be loaded
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.
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.

Exceptions:
TimeoutException if the operation timed out
RegionDestroyedException if this region has been destroyed
See also:
Put

IGFSerializable ^ GemStone::GemFire::Cache::Region::Get ( ICacheableKey^   key,
IGFSerializable^   callback 
)

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

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 and CacheStatistics.LastModifiedTime (if a new value is loaded) for this region and the entry.

If an ICacheWriter throws a CacheWriterException when a new value is retrieved from a loader, then the value will not be put into the cache (a new entry will not be created) but the get will return the value and not propagate the exception.

Parameters:
key key whose associated value is to be returned -- the key object must implement the equals and hashcode methods.
callback An argument passed into the CacheLoader if loader is used -- will also be subsequently passed to a CacheWriter if the loader returns a non-null value to be placed in the cache. Modifications to this argument made in the CacheLoader will be visible to the CacheWriter, even if the loader and the writer are installed in different cache processes. Can be null.
Returns:
value, or null if the value is not found and can't be loaded
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.
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.

Exceptions:
TimeoutException if the operation timed out
RegionDestroyedException if this region has been destroyed
See also:
Put

AttributesMutator ^ GemStone::GemFire::Cache::Region::GetAttributesMutator (  ) 

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

Returns:
attribute mutator
Exceptions:
RegionDestroyedException if the region has been destroyed

array<RegionEntry^> ^ GemStone::GemFire::Cache::Region::GetEntries ( Boolean  recursive  ) 

Gets the entries in this region.

Parameters:
recursive if true, also return all nested subregion entries
Returns:
array of entries

RegionEntry ^ GemStone::GemFire::Cache::Region::GetEntry ( CacheableKey^   key  ) 

Return the meta-object RegionEntry for the given key.

Parameters:
key key to use
Returns:
region entry object
Exceptions:
IllegalArgumentException key is null
RegionDestroyedException region has been destroyed

RegionEntry ^ GemStone::GemFire::Cache::Region::GetEntry ( ICacheableKey^   key  ) 

Return the meta-object RegionEntry for the given key.

Parameters:
key key to use
Returns:
region entry object
Exceptions:
IllegalArgumentException key is null
RegionDestroyedException region has been destroyed

array<MemberId^> ^ GemStone::GemFire::Cache::Region::GetInterestList ( CacheableKey^   key  ) 

This functionality is unsupported in the Native Client Product.

array<MemberId^> ^ GemStone::GemFire::Cache::Region::GetInterestList ( ICacheableKey^   key  ) 

This functionality is unsupported in the Native Client Product.

array<ICacheableKey^> ^ GemStone::GemFire::Cache::Region::GetKeys (  ) 

Returns all the keys in the local process for this region. This includes keys for which the entry is invalid.

Returns:
array of keys

array<ICacheableKey^> ^ GemStone::GemFire::Cache::Region::GetServerKeys (  ) 

Returns the set of keys defined in the server process associated with this client and region. If a server has the region defined as a mirror, then this will be the entire keyset for the region across all server Peers in the distributed system.

Exceptions:
UnsupportedOperationException if the member type is not Client or region is not a Native Client region.

Exceptions:
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.
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.

Exceptions:
TimeoutException if there is a timeout getting the keys
Returns:
array of keys

Region ^ GemStone::GemFire::Cache::Region::GetSubRegion ( String^   path  ) 

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

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

array<IGFSerializable^> ^ GemStone::GemFire::Cache::Region::GetValues (  ) 

Returns all values in the local process for this region. No value is included for entries that are invalidated.

Returns:
array of values

void GemStone::GemFire::Cache::Region::Invalidate ( CacheableKey^   key  )  [inline]

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.

The invalidate is not propogated to the Gemfire cache server to which it is connected with.

Does not update any CacheStatistics.

Parameters:
key key of the value to be invalidated
Exceptions:
IllegalArgumentException if key is null
EntryNotFoundException if this entry does not exist in this region locally
RegionDestroyedException if the region is destroyed
See also:
LocalInvalidate, Destroy, ICacheListener.AfterInvalidate

void GemStone::GemFire::Cache::Region::Invalidate ( ICacheableKey^   key  )  [inline]

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.

The invalidate is not propogated to the Gemfire cache server to which it is connected with.

Does not update any CacheStatistics.

Parameters:
key key of the value to be invalidated
Exceptions:
IllegalArgumentException if key is null
EntryNotFoundException if this entry does not exist in this region locally
RegionDestroyedException if the region is destroyed
See also:
LocalInvalidate, Destroy, ICacheListener.AfterInvalidate

void GemStone::GemFire::Cache::Region::Invalidate ( CacheableKey^   key,
IGFSerializable^   callback 
)

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.

The invalidate is not propogated to the Gemfire cache server to which it is connected with.

Does not update any CacheStatistics.

Parameters:
key key of the value to be invalidated
callback a user-defined parameter to pass to callback events triggered by this method
Exceptions:
IllegalArgumentException if key is null
EntryNotFoundException if this entry does not exist in this region locally
RegionDestroyedException if the region is destroyed
See also:
LocalInvalidate, Destroy, ICacheListener.AfterInvalidate

void GemStone::GemFire::Cache::Region::Invalidate ( ICacheableKey^   key,
IGFSerializable^   callback 
)

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.

The invalidate is not propogated to the Gemfire cache server to which it is connected with.

Does not update any CacheStatistics.

Parameters:
key key of the value to be invalidated
callback a user-defined parameter to pass to callback events triggered by this method
Exceptions:
IllegalArgumentException if key is null
EntryNotFoundException if this entry does not exist in this region locally
RegionDestroyedException if the region is destroyed
See also:
LocalInvalidate, Destroy, ICacheListener.AfterInvalidate

void GemStone::GemFire::Cache::Region::InvalidateRegion (  )  [inline]

Invalidates this region.

The invalidation will cascade to all the subregions and cached entries. The region and the entries in it will still exist.

This operation is not distributed for native clients

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

Does not update any CacheStatistics.

Exceptions:
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException if this region has been destroyed
See also:
LocalInvalidateRegion, DestroyRegion, ICacheListener.AfterRegionInvalidate

void GemStone::GemFire::Cache::Region::InvalidateRegion ( IGFSerializable^   callback  ) 

Invalidates this region.

The invalidation will cascade to all the subregions and cached entries. The region and the entries in it will still exist.

This operation is not distributed for native clients

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

Does not update any CacheStatistics.

Parameters:
callback user-defined parameter to pass to callback events triggered by this method
Exceptions:
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException if this region has been destroyed
See also:
LocalInvalidateRegion, DestroyRegion, ICacheListener.AfterRegionInvalidate

void GemStone::GemFire::Cache::Region::LocalDestroy ( CacheableKey^   key  )  [inline]

Destroys the value with the specified key in the local cache only. Destroy removes not only the value but also the key and entry from this region.

No ICacheWriter is invoked.

Does not update any CacheStatistics.

Parameters:
key the key of the entry to destroy
Exceptions:
IllegalArgumentException if key is null
IllegalStateException if this region has mirroring enabled
EntryNotFoundException if the entry does not exist in this region locally
See also:
Destroy, LocalInvalidate, ICacheListener.AfterDestroy, ICacheWriter.BeforeDestroy

void GemStone::GemFire::Cache::Region::LocalDestroy ( ICacheableKey^   key  )  [inline]

Destroys the value with the specified key in the local cache only. Destroy removes not only the value but also the key and entry from this region.

No ICacheWriter is invoked.

Does not update any CacheStatistics.

Parameters:
key the key of the entry to destroy
Exceptions:
IllegalArgumentException if key is null
IllegalStateException if this region has mirroring enabled
EntryNotFoundException if the entry does not exist in this region locally
See also:
Destroy, LocalInvalidate, ICacheListener.AfterDestroy, ICacheWriter.BeforeDestroy

void GemStone::GemFire::Cache::Region::LocalDestroy ( CacheableKey^   key,
IGFSerializable^   cacheListenerArg 
)

Destroys the value with the specified key in the local cache only. Destroy removes not only the value but also the key and entry from this region.

No ICacheWriter is invoked.

Does not update any CacheStatistics.

Parameters:
key the key of the entry to destroy
cacheListenerArg a user-defined parameter to pass to cache listeners triggered by this method
Exceptions:
IllegalArgumentException if key is null
IllegalStateException if this region has mirroring enabled
EntryNotFoundException if the entry does not exist in this region locally
See also:
Destroy, LocalInvalidate, ICacheListener.AfterDestroy, ICacheWriter.BeforeDestroy

void GemStone::GemFire::Cache::Region::LocalDestroy ( ICacheableKey^   key,
IGFSerializable^   cacheListenerArg 
)

Destroys the value with the specified key in the local cache only. Destroy removes not only the value but also the key and entry from this region.

No ICacheWriter is invoked.

Does not update any CacheStatistics.

Parameters:
key the key of the entry to destroy
cacheListenerArg a user-defined parameter to pass to cache listeners triggered by this method
Exceptions:
IllegalArgumentException if key is null
IllegalStateException if this region has mirroring enabled
EntryNotFoundException if the entry does not exist in this region locally
See also:
Destroy, LocalInvalidate, ICacheListener.AfterDestroy, ICacheWriter.BeforeDestroy

void GemStone::GemFire::Cache::Region::LocalDestroyRegion (  )  [inline]

Destroys the whole local region and provides a user-defined parameter object to any ICacheWriter invoked in the process. The region destroy is not distributed to other caches.

Destroy cascades to all entries and subregions. After the destroy, any attempt to use this region object will get a RegionDestroyedException.

Does not update any CacheStatistics.

Exceptions:
CacheWriterException if a CacheWriter aborts the operation; if this occurs some subregions may have already been successfully destroyed.
See also:
DestroyRegion, LocalInvalidateRegion

void GemStone::GemFire::Cache::Region::LocalDestroyRegion ( IGFSerializable^   callback  ) 

Destroys the whole local region and provides a user-defined parameter object to any ICacheWriter invoked in the process. The region destroy is not distributed to other caches.

Destroy cascades to all entries and subregions. After the destroy, any attempt to use this region object will get a RegionDestroyedException.

Does not update any CacheStatistics.

Parameters:
callback a user-defined parameter to pass to callback events triggered by this call
Exceptions:
CacheWriterException if a CacheWriter aborts the operation; if this occurs some subregions may have already been successfully destroyed.
See also:
DestroyRegion, LocalInvalidateRegion

void GemStone::GemFire::Cache::Region::LocalInvalidate ( CacheableKey^   key  )  [inline]

Locally 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.

Does not update any CacheStatistics.

Parameters:
key key of the value to be invalidated
Exceptions:
IllegalArgumentException if key is null
EntryNotFoundException if this entry does not exist in this region locally
RegionDestroyedException if the region is destroyed
See also:
Invalidate, Destroy, ICacheListener.AfterInvalidate

void GemStone::GemFire::Cache::Region::LocalInvalidate ( ICacheableKey^   key  )  [inline]

Locally 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.

Does not update any CacheStatistics.

Parameters:
key key of the value to be invalidated
Exceptions:
IllegalArgumentException if key is null
EntryNotFoundException if this entry does not exist in this region locally
RegionDestroyedException if the region is destroyed
See also:
Invalidate, Destroy, ICacheListener.AfterInvalidate

void GemStone::GemFire::Cache::Region::LocalInvalidate ( CacheableKey^   key,
IGFSerializable^   callback 
)

Locally 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.

Does not update any CacheStatistics.

Parameters:
key key of the value to be invalidated
callback a user-defined parameter to pass to callback events triggered by this method
Exceptions:
IllegalArgumentException if key is null
EntryNotFoundException if this entry does not exist in this region locally
RegionDestroyedException if the region is destroyed
See also:
Invalidate, Destroy, ICacheListener.AfterInvalidate

void GemStone::GemFire::Cache::Region::LocalInvalidate ( ICacheableKey^   key,
IGFSerializable^   callback 
)

Locally 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.

Does not update any CacheStatistics.

Parameters:
key key of the value to be invalidated
callback a user-defined parameter to pass to callback events triggered by this method
Exceptions:
IllegalArgumentException if key is null
EntryNotFoundException if this entry does not exist in this region locally
RegionDestroyedException if the region is destroyed
See also:
Invalidate, Destroy, ICacheListener.AfterInvalidate

void GemStone::GemFire::Cache::Region::LocalInvalidateRegion (  )  [inline]

Invalidates this region without distributing to other caches.

The invalidation will cascade to all the local subregions and cached entries. The region and the entries in it will still exist.

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

Does not update any CacheStatistics.

Exceptions:
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException if the region is no longer valid
See also:
InvalidateRegion, LocalDestroyRegion, ICacheListener.AfterRegionInvalidate

void GemStone::GemFire::Cache::Region::LocalInvalidateRegion ( IGFSerializable^   callback  ) 

Invalidates this region without distributing to other caches.

The invalidation will cascade to all the local subregions and cached entries. The region and the entries in it will still exist.

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

Does not update any CacheStatistics.

Parameters:
callback a user-defined parameter to pass to callback events triggered by this method
Exceptions:
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException if the region is no longer valid
See also:
InvalidateRegion, LocalDestroyRegion, ICacheListener.AfterRegionInvalidate

void GemStone::GemFire::Cache::Region::Put ( CacheableKey^   key,
Serializable^   value 
) [inline]

Puts a new value into an entry in this region with the specified key, passing the callback argument to any cache writers 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 with.

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.

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

Parameters:
key a key object allocated before the call, and caller should not deallocate this object
value the value to be put into this region
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the value
See also:
Get, Create

void GemStone::GemFire::Cache::Region::Put ( ICacheableKey^   key,
Serializable^   value 
) [inline]

Puts a new value into an entry in this region with the specified key, passing the callback argument to any cache writers 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 with.

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.

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

Parameters:
key a key object allocated before the call, and caller should not deallocate this object
value the value to be put into this region
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the value
See also:
Get, Create

void GemStone::GemFire::Cache::Region::Put ( CacheableKey^   key,
IGFSerializable^   value 
) [inline]

Puts a new value into an entry in this region with the specified key, passing the callback argument to any cache writers 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 with.

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.

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

Parameters:
key a key object allocated before the call, and caller should not deallocate this object
value the value to be put into this region
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the value
See also:
Get, Create

void GemStone::GemFire::Cache::Region::Put ( ICacheableKey^   key,
IGFSerializable^   value 
) [inline]

Puts a new value into an entry in this region with the specified key, passing the callback argument to any cache writers 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 with.

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.

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

Parameters:
key a key object allocated before the call, and caller should not deallocate this object
value the value to be put into this region
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the value
See also:
Get, Create

void GemStone::GemFire::Cache::Region::Put ( CacheableKey^   key,
Serializable^   value,
IGFSerializable^   callback 
)

Puts a new value into an entry in this region with the specified key, passing the callback argument to any cache writers 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 with.

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.

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

Parameters:
key a key object allocated before the call, and caller should not deallocate this object
value the value to be put into this region
callback argument that is passed to the callback function
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the value
See also:
Get, Create

void GemStone::GemFire::Cache::Region::Put ( ICacheableKey^   key,
Serializable^   value,
IGFSerializable^   callback 
)

Puts a new value into an entry in this region with the specified key, passing the callback argument to any cache writers 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 with.

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.

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

Parameters:
key a key object allocated before the call, and caller should not deallocate this object
value the value to be put into this region
callback argument that is passed to the callback function
Exceptions:
IllegalArgumentException if key is null

Exceptions:
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.

Exceptions:
RegionDestroyedException if region has been destroyed
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the value
See also:
Get, Create

void GemStone::GemFire::Cache::Region::Put ( CacheableKey^   key,
IGFSerializable^   value,
IGFSerializable^   callback 
)

Puts a new value into an entry in this region with the specified key, passing the callback argument to any cache writers 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 with.

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.

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

Parameters:
key a key object allocated before the call, and caller should not deallocate this object
value the value to be put into this region
callback argument that is passed to the callback function
Exceptions:
IllegalArgumentException if key is null
RegionDestroyedException if region has been destroyed

Exceptions:
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.

Exceptions:
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the value
See also:
Get, Create

void GemStone::GemFire::Cache::Region::Put ( ICacheableKey^   key,
IGFSerializable^   value,
IGFSerializable^   callback 
)

Puts a new value into an entry in this region with the specified key, passing the callback argument to any cache writers 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 with.

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.

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

Parameters:
key a key object allocated before the call, and caller should not deallocate this object
value the value to be put into this region
callback argument that is passed to the callback function
Exceptions:
IllegalArgumentException if key is null
RegionDestroyedException if region has been destroyed

Exceptions:
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.

Exceptions:
TimeoutException if the operation timed out
OutOfMemoryException if there is not enough memory for the value
See also:
Get, Create

ISelectResults ^ GemStone::GemFire::Cache::Region::Query ( String^   predicate  ) 

Executes the query on the server based on the predicate. Valid only for a Native Client region.

Parameters:
predicate The query predicate (just the WHERE clause) or the entire query to execute
Exceptions:
IllegalArgumentException If the predicate is empty.
IllegalStateException If some error occurred.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
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.
QueryException If some query error occurred at the server.
TimeoutException if the operation timed out
CacheClosedException if the cache has been closed
Returns:
The SelectResults which can either be a ResultSet or a StructSet.

ISelectResults ^ GemStone::GemFire::Cache::Region::Query ( String^   predicate,
UInt32  timeout 
)

Executes the query on the server based on the predicate. Valid only for a Native Client region.

Parameters:
predicate The query predicate (just the WHERE clause) or the entire query to execute
timeout The time (in seconds) to wait for the query response, optional
Exceptions:
IllegalArgumentException If the predicate is empty.
IllegalStateException If some error occurred.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
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.
QueryException If some query error occurred at the server.
TimeoutException if the operation timed out
CacheClosedException if the cache has been closed
Returns:
The SelectResults which can either be a ResultSet or a StructSet.

void GemStone::GemFire::Cache::Region::RegisterAllKeys ( Boolean  isDurable  ) 

Register interest for all the keys of the region to get updates from the server. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true. Should only be called for durable clients and with cache server version 5.5 onwards.

Parameters:
isDurable whether the registration should be durable
Exceptions:
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::RegisterAllKeys (  )  [inline]

Register interest for all the keys of the region to get updates from the server. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true.

Exceptions:
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::RegisterKeys ( array< CacheableKey^ >^  keys,
IGFSerializable^   callback,
Boolean  isDurable 
)

Registers an array of keys for getting updates from the server. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true. Should only be called for durable clients and with cache server version 5.5 onwards.

Parameters:
keys the array of keys
callback user-defined parameter to pass to callback events triggered by this method
isDurable whether the registration should be durable
Exceptions:
IllegalArgumentException If the array of keys is empty.
IllegalStateException If already registered interest for all keys.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::RegisterKeys ( array< CacheableKey^ >^  keys,
IGFSerializable^   callback 
) [inline]

Registers an array of keys for getting updates from the server. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true.

Parameters:
keys the array of keys
callback user-defined parameter to pass to callback events triggered by this method
Exceptions:
IllegalArgumentException If the array of keys is empty.
IllegalStateException If already registered interest for all keys.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::RegisterKeys ( array< CacheableKey^ >^  keys  )  [inline]

Registers an array of keys for getting updates from the server. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true.

Parameters:
keys the array of keys
Exceptions:
IllegalArgumentException If the array of keys is empty.
IllegalStateException If already registered interest for all keys.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::RegisterKeys ( array< ICacheableKey^ >^  keys,
IGFSerializable^   callback,
Boolean  isDurable 
)

Registers an array of keys for getting updates from the server. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true. Should only be called for durable clients and with cache server version 5.5 onwards.

Parameters:
keys the array of keys
callback user-defined parameter to pass to callback events triggered by this method
isDurable whether the registration should be durable
Exceptions:
IllegalArgumentException If the array of keys is empty.
IllegalStateException If already registered interest for all keys.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::RegisterKeys ( array< ICacheableKey^ >^  keys,
IGFSerializable^   callback 
) [inline]

Registers an array of keys for getting updates from the server. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true.

Parameters:
keys the array of keys
callback user-defined parameter to pass to callback events triggered by this method
Exceptions:
IllegalArgumentException If the array of keys is empty.
IllegalStateException If already registered interest for all keys.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::RegisterKeys ( array< ICacheableKey^ >^  keys  )  [inline]

Registers an array of keys for getting updates from the server. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true.

Parameters:
keys the array of keys
Exceptions:
IllegalArgumentException If the array of keys is empty.
IllegalStateException If already registered interest for all keys.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::RegisterRegex ( String^   regex,
Boolean  isDurable 
)

Register interest for the keys of the region that match the given regular expression to get updates from the server. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true. Should only be called for durable clients and with cache server version 5.5 onwards.

Parameters:
regex the regular expression to register
isDurable whether the registration should be durable
Exceptions:
IllegalArgumentException If the regular expression string is empty.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
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.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::RegisterRegex ( String^   regex  )  [inline]

Register interest for the keys of the region that match the given regular expression to get updates from the server. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true.

Exceptions:
IllegalArgumentException If the regular expression string is empty.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
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.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

IGFSerializable ^ GemStone::GemFire::Cache::Region::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.

Parameters:
predicate The query predicate (just the WHERE clause) or the entire query to execute
Exceptions:
IllegalArgumentException If the predicate is empty.
IllegalStateException If some error occurred.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
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.
QueryException If some query error occurred at the server, or more than one result items are available.
TimeoutException if the operation timed out
CacheClosedException if the cache has been closed
Returns:
The single ResultSet or StructSet item, or NULL of no results are available.

IGFSerializable ^ GemStone::GemFire::Cache::Region::SelectValue ( String^   predicate,
UInt32  timeout 
)

Executes the query on the server based on the predicate and returns a single result value. Valid only for a Native Client region.

Parameters:
predicate The query predicate (just the WHERE clause) or the entire query to execute
timeout The time (in seconds) to wait for the query response
Exceptions:
IllegalArgumentException If the predicate is empty.
IllegalStateException If some error occurred.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
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.
QueryException If some query error occurred at the server, or more than one result items are available.
TimeoutException if the operation timed out
CacheClosedException if the cache has been closed
Returns:
The single ResultSet or StructSet item, or NULL of no results are available.

array<Region^> ^ GemStone::GemFire::Cache::Region::SubRegions ( Boolean  recursive  ) 

Returns the subregions of this region.

Parameters:
recursive if true, also return all nested subregions
Returns:
array of regions
Exceptions:
RegionDestroyedException this region has already been destroyed

void GemStone::GemFire::Cache::Region::UnregisterAllKeys (  ) 

Unregister interest for all the keys of the region to stop getting updates for them. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true.

Exceptions:
IllegalStateException If not previously registered all keys.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::UnregisterKeys ( array< CacheableKey^ >^  keys,
IGFSerializable^   callback 
)

Unregisters an array of keys to stop getting updates for them. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true.

Parameters:
keys the array of keys
callback user-defined parameter to pass to callback events triggered by this method
Exceptions:
IllegalArgumentException If the array of keys is empty.
IllegalStateException If no keys were previously registered.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::UnregisterKeys ( array< CacheableKey^ >^  keys  )  [inline]

Unregisters an array of keys to stop getting updates for them. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true.

Parameters:
keys the array of keys
Exceptions:
IllegalArgumentException If the array of keys is empty.
IllegalStateException If no keys were previously registered.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::UnregisterKeys ( array< ICacheableKey^ >^  keys,
IGFSerializable^   callback 
)

Unregisters an array of keys to stop getting updates for them. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true.

Parameters:
keys the array of keys
callback user-defined parameter to pass to callback events triggered by this method
Exceptions:
IllegalArgumentException If the array of keys is empty.
IllegalStateException If no keys were previously registered.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::UnregisterKeys ( array< ICacheableKey^ >^  keys  )  [inline]

Unregisters an array of keys to stop getting updates for them. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true.

Parameters:
keys the array of keys
Exceptions:
IllegalArgumentException If the array of keys is empty.
IllegalStateException If no keys were previously registered.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.

void GemStone::GemFire::Cache::Region::UnregisterRegex ( String^   regex  ) 

Unregister interest for the keys of the region that match the given regular expression to stop getting updates for them. The regular expression must have been registered previously using a RegisterRegex call. Valid only for a Native Client region when client notification ( AttributesFactory.SetClientNotificationEnabled ) is true.

Exceptions:
IllegalArgumentException If the regular expression string is empty.
IllegalStateException If this regular expression has not been registered by a previous call to RegisterRegex.
CacheServerException If an exception is received from the Java cache server.
NotConnectedException if not connected to the GemFire system because the client cannot establish usable connections to any of the servers given to it.
RegionDestroyedException If region destroy is pending.
UnsupportedOperationException If the region is not a Native Client region or AttributesFactory.SetClientNotificationEnabled is false.
TimeoutException if the operation timed out
UnknownException For other exceptions.


Property Documentation

RegionAttributes^ GemStone::GemFire::Cache::Region::Attributes [get]

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

Returns:
region's attributes

Cache^ GemStone::GemFire::Cache::Region::Cache [get]

Gets the cache for this region.

Returns:
region's cache

String^ GemStone::GemFire::Cache::Region::FullPath [get]

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

Returns:
region's pathname

Boolean GemStone::GemFire::Cache::Region::IsDestroyed [get]

True if this region has been destroyed.

Returns:
true if destroyed

String^ GemStone::GemFire::Cache::Region::Name [get]

Gets the region name.

Returns:
region's name

Region^ GemStone::GemFire::Cache::Region::ParentRegion [get]

Gets the parent region.

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

UInt32 GemStone::GemFire::Cache::Region::PeerCount [get]

This functionality is unsupported in the Native Client Product.

CacheStatistics^ GemStone::GemFire::Cache::Region::Statistics [get]

Returns the statistics for this region.

Returns:
the CacheStatistics for this region
Exceptions:
StatisticsDisabledException if statistics have been disabled for this region


GemFire C++ Cache .NET API Documentation