Top level class for configuring and using Geode on a client.This should be called once to create Cache
.
More...
#include <CacheFactory.hpp>
|
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 Pool
s see PoolManager
◆ CacheFactory() [1/2]
apache::geode::client::CacheFactory::CacheFactory |
( |
| ) |
|
|
noexcept |
◆ CacheFactory() [2/2]
apache::geode::client::CacheFactory::CacheFactory |
( |
const std::shared_ptr< Properties > & |
properties | ) |
|
|
explicitnoexcept |
◆ create()
Cache apache::geode::client::CacheFactory::create |
( |
| ) |
const |
To create the instance of Cache
.
◆ getProductDescription()
static const std::string & apache::geode::client::CacheFactory::getProductDescription |
( |
| ) |
|
|
static |
Returns the product description string including product name and version.
◆ getVersion()
static const std::string & apache::geode::client::CacheFactory::getVersion |
( |
| ) |
|
|
static |
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
◆ set()
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}.
- Parameters
-
name | the name of the geode property |
value | the value of the geode property |
- Returns
- a reference to
this
- Since
- 3.5
◆ setAuthInitialize()
Sets the AuthInitializer defined by the user.
The AuthInitializer will be used to obtain credentials for a client.
- Parameters
-
authInitialize | the authInitialize to set |
- Returns
- this ClientCacheFactory
◆ setPdxIgnoreUnreadFields()
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.
- Parameters
-
ignore | true if fields not read during pdx deserialization should be ignored; false , the default, if they should be preserved. |
- Returns
- this CacheFactory
- Since
- 3.6
◆ setPdxReadSerialized()
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.
- Parameters
-
- Returns
- this ClientCacheFactory