Pivotal GemFire Native C++ Reference
10.0.5
|
Public Member Functions | |
CacheFactory () noexcept | |
To create the instance of CacheFactory. More... | |
CacheFactory (const std::shared_ptr< Properties > &properties) noexcept | |
To create the instance of CacheFactory. More... | |
Cache | create () const |
To create the instance of Cache. More... | |
CacheFactory & | set (std::string name, std::string value) |
Sets a geode property that will be used when creating the {link @Cache}. More... | |
CacheFactory & | setAuthInitialize (const std::shared_ptr< AuthInitialize > &authInitialize) |
Sets the AuthInitializer defined by the user. More... | |
CacheFactory & | setPdxIgnoreUnreadFields (bool ignore) |
Control whether pdx ignores fields that were unread during deserialization. More... | |
CacheFactory & | setPdxReadSerialized (bool pdxReadSerialized) |
Sets the object preference to PdxInstance type. More... | |
Static Public Member Functions | |
static const std::string & | getProductDescription () |
Returns the product description string including product name and version. More... | |
static const std::string & | getVersion () |
Returns the version of the cache implementation. More... | |
Top level class for configuring and using Geode on a client.This should be called once to create Cache.
For the default values for the pool attributes see PoolFactory. To create additional Pools see PoolManager
|
noexcept |
To create the instance of CacheFactory.
|
explicitnoexcept |
To create the instance of CacheFactory.
properties | Properties which are applicable at client level. |
|
static |
Returns the product description string including product name and version.
|
static |
Returns the version of the cache implementation.
For the 1.0 release of Geode, the string returned is 1.0
.
String
CacheFactory& apache::geode::client::CacheFactory::set | ( | std::string | name, |
std::string | value | ||
) |
Sets a geode property that will be used when creating the {link @Cache}.
name | the name of the geode property |
value | the value of the geode property |
this
CacheFactory& apache::geode::client::CacheFactory::setAuthInitialize | ( | const std::shared_ptr< AuthInitialize > & | authInitialize | ) |
Sets the AuthInitializer defined by the user.
The AuthInitializer will be used to obtain credentials for a client.
authInitialize |
CacheFactory& apache::geode::client::CacheFactory::setPdxIgnoreUnreadFields | ( | bool | ignore | ) |
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.
ignore | true if fields not read during pdx deserialization should be ignored; false , the default, if they should be preserved. |
CacheFactory& apache::geode::client::CacheFactory::setPdxReadSerialized | ( | bool | pdxReadSerialized | ) |
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 C++ 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.
pdxReadSerialized | true to prefer PdxInstance |