VMware Tanzu GemFire Native .NET Reference 10.2.7
Apache::Geode::Client::CacheFactory Class Reference

A factory class that must be used to obtain instance of Cache. More...

#include <CacheFactory.hpp>

Public Member Functions

 CacheFactory ()
 A factory class that must be used to obtain instance of Cache. More...
 
 CacheFactory (Properties< String^, String^>^ dsProps)
 A factory class that must be used to obtain instance of Cache. More...
 
CacheCreate ()
 To create the instance of Cache. More...
 
CacheFactorySet (String^ name, String^ value)
 Sets a geode property that will be used when creating the ClientCache. More...
 
CacheFactorySetAuthInitialize (IAuthInitialize^ authInitialize)
 Sets the AuthInitializer defined by the user. More...
 
CacheFactorySetPdxIgnoreUnreadFields (bool ignore)
 summary> Sets the object preference to PdxInstance type. More...
 

Properties

static String^ ProductDescription [get]
 Returns the product description string including product name and version. More...
 
static String^ Version [get]
 Returns the version of the cache implementation. More...
 

Detailed Description

A factory class that must be used to obtain instance of Cache.

To create a new cache instance, use CacheFactory.Create.

To get an existing unclosed cache instance, use Cache.GetInstance.

Constructor & Destructor Documentation

◆ CacheFactory() [1/2]

Apache::Geode::Client::CacheFactory::CacheFactory ( Properties< String^, String^>^  dsProps)

A factory class that must be used to obtain instance of Cache.

Parameters
dsPropsProperties which are applicable at client level.

◆ CacheFactory() [2/2]

Apache::Geode::Client::CacheFactory::CacheFactory ( )

A factory class that must be used to obtain instance of Cache.


Member Function Documentation

◆ Create()

Cache ^ Apache::Geode::Client::CacheFactory::Create ( )

To create the instance of Cache.

◆ Set()

CacheFactory ^ Apache::Geode::Client::CacheFactory::Set ( String^  name,
String^  value 
)

Sets a geode property that will be used when creating the ClientCache.

name the name of the geode property

value the value of the geode property

Returns
a instance of CacheFactory

◆ SetAuthInitialize()

CacheFactory ^ Apache::Geode::Client::CacheFactory::SetAuthInitialize ( IAuthInitialize authInitialize)

Sets the AuthInitializer defined by the user.

The AuthInitializer will be used to obtain credentials for a client.

authInitialize

Returns
a instance of CacheFactory

◆ SetPdxIgnoreUnreadFields()

CacheFactory ^ Apache::Geode::Client::CacheFactory::SetPdxIgnoreUnreadFields ( bool  ignore)

summary> Sets the object preference to PdxInstance type.

When a cached object that was serialized as a PDX is read from the cache a PdxInstance will be returned instead of the actual domain class. The PdxInstance is an interface that provides run time access to the fields of a PDX without deserializing the entire PDX. The PdxInstance implementation is a light weight wrapper that simply refers to the raw bytes of the PDX that are kept in the cache. Using this method applications can choose to access PdxInstance instead of Java object. Note that a PdxInstance is only returned if a serialized PDX is found in the cache. If the cache contains a deserialized PDX, then a domain class instance is returned instead of a PdxInstance. /summary> pdxReadSerialized

true

to prefer PdxInstance

false

, the default, if they should be preserved.

Returns
a instance of CacheFactory

Property Documentation

◆ ProductDescription

String^ Apache::Geode::Client::CacheFactory::ProductDescription
staticget

Returns the product description string including product name and version.

summary> Control whether pdx ignores fields that were unread during deserialization. The default is to preserve unread fields be including their data during serialization. But if you configure the cache to ignore unread fields then their data will be lost during serialization.

You should only set this attribute to true if you know this member will only be reading cache data. In this use case you do not need to pay the cost of preserving the unread fields since you will never be reserializing pdx data. summary> ignore

true

if fields not read during pdx deserialization should be ignored;

false

, the default, if they should be preserved.

Returns
a instance of CacheFactory

◆ Version

String^ Apache::Geode::Client::CacheFactory::Version
staticget

Returns the version of the cache implementation.

For the 1.0 release of Geode, the string returned is 1.0.

Returns
the version of the cache implementation as a String

Apache Geode C++ Cache .NET API Documentation