Pivotal GemFire Native .NET Reference  10.0.5
Apache::Geode::Client::IGeodeCache Interface Reference

GeodeCache represents the singleton cache that must be created in order to connect to Geode server. More...

Inherits Apache::Geode::Client::IRegionService.

Inherited by Apache::Geode::Client::Cache.

Public Member Functions

void Close ()
 Terminates this object cache and releases all the local resources. More...
 
IPdxInstanceFactoryCreatePdxInstanceFactory (String^ className)
 Returns a factory that can create a PdxInstance. More...
 
bool GetPdxIgnoreUnreadFields ()
 summary> Returns whether PdxInstance is preferred for PDX types instead of .NET object. More...
 
Client::QueryServiceGetQueryService ()
 Get a query service object to be able to query the cache. More...
 
template<class TKey , class TValue >
IRegion< TKey, TValue > ^ GetRegion (String^ name)
 Returns an existing region given the full path from root, or null if no such region exists. More...
 
void InitializeDeclarativeCache (String^ cacheXml)
 Initializes the cache from an XML file. More...
 
template<class TKey , class TValue >
array< IRegion< TKey, TValue >^> ^ RootRegions ()
 Returns an array of root regions in the cache. More...
 

Properties

Apache::Geode::Client::CacheTransactionManagerCacheTransactionManager [get]
 Returns the cache transaction manager of CacheFactory.Create this cache. More...
 
bool IsClosed [get]
 True if this cache has been closed. More...
 
String^ Name [get]
 Returns the name of this cache. More...
 

Detailed Description

GeodeCache represents the singleton cache that must be created in order to connect to Geode server.

Caches are obtained from Crest methods on the CacheFactory.Create class.

When a cache is created a DistributedSystem must be specified.

When a cache will no longer be used, call Cache.Close. Once it Cache.IsClosed any attempt to use it will cause a CacheClosedException to be thrown.

A cache can have multiple root regions, each with a different name.

Member Function Documentation

◆ Close()

void Apache::Geode::Client::IRegionService::Close ( )
inherited

Terminates this object cache and releases all the local resources.

If RegionService is created from Cache.CreateAuthenticatedView, then it clears user related security data.

After this cache is closed, any further method call on this cache or any region object will throw CacheClosedException, unless otherwise noted.

Exceptions
CacheClosedExceptionif the cache is already closed.

Implemented in Apache::Geode::Client::Cache.

◆ CreatePdxInstanceFactory()

IPdxInstanceFactory ^ Apache::Geode::Client::IRegionService::CreatePdxInstanceFactory ( String^  className)
inherited

Returns a factory that can create a PdxInstance.

Parameters
classNamethe fully qualified class name that the PdxInstance will become when it is fully deserialized.
Returns
the factory

Implemented in Apache::Geode::Client::Cache.

◆ GetPdxIgnoreUnreadFields()

bool Apache::Geode::Client::IGeodeCache::GetPdxIgnoreUnreadFields ( )

summary> Returns whether PdxInstance is preferred for PDX types instead of .NET object.

/summary>

Implemented in Apache::Geode::Client::Cache.

◆ GetQueryService()

Client::QueryService ^ Apache::Geode::Client::IRegionService::GetQueryService ( )
inherited

Get a query service object to be able to query the cache.

Currently only works against the java server in native mode, and at least some endpoints must have been defined in some regions before actually firing a query.

Implemented in Apache::Geode::Client::Cache.

◆ GetRegion()

template<class TKey , class TValue >
IRegion<TKey, TValue> ^ Apache::Geode::Client::IRegionService::GetRegion ( String^  name)
inherited

Returns an existing region given the full path from root, or null if no such region exists.

Parameters
namethe name of the region
Returns
the region

Implemented in Apache::Geode::Client::Cache.

◆ InitializeDeclarativeCache()

void Apache::Geode::Client::IGeodeCache::InitializeDeclarativeCache ( String^  cacheXml)

Initializes the cache from an XML file.

Parameters
cacheXmlpathname of a cache.xml file

Implemented in Apache::Geode::Client::Cache.

◆ RootRegions()

template<class TKey , class TValue >
array<IRegion<TKey, TValue>^> ^ Apache::Geode::Client::IRegionService::RootRegions ( )
inherited

Returns an array of root regions in the cache.

This set is a snapshot and is not backed by the cache.

It is not supported when Cache is created from Pool.

Returns
array of regions

Implemented in Apache::Geode::Client::Cache.

Property Documentation

◆ CacheTransactionManager

Apache:: Geode:: Client:: CacheTransactionManager^ Apache::Geode::Client::IGeodeCache::CacheTransactionManager
get

Returns the cache transaction manager of CacheFactory.Create this cache.

summary> Returns whether Cache saves unread fields for Pdx types. /summary>

◆ IsClosed

bool Apache::Geode::Client::IRegionService::IsClosed
getinherited

True if this cache has been closed.

After a new cache object is created, this method returns false. After Close is called on this cache object, this method returns true.

Returns
true if this cache is closed, otherwise false

◆ Name

String^ Apache::Geode::Client::IGeodeCache::Name
get

Returns the name of this cache.

This method does not throw CacheClosedException if the cache is closed.

Returns
the string name of this cache

Apache Geode C++ Cache .NET API Documentation