VMware VMware GemFire Native C++ Reference 10.4.3
Loading...
Searching...
No Matches
CacheFactory.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#pragma once
19
20#ifndef GEODE_CACHEFACTORY_H_
21#define GEODE_CACHEFACTORY_H_
22
23#include <string>
24
25#include "Cache.hpp"
26#include "PoolFactory.hpp"
27#include "internal/geode_globals.hpp"
28
33namespace apache {
34namespace geode {
35namespace client {
36
37class CppCacheLibrary;
38class AuthInitialize;
39
48class APACHE_GEODE_EXPORT CacheFactory {
49 public:
53 CacheFactory() noexcept;
54
60 explicit CacheFactory(const std::shared_ptr<Properties>& properties) noexcept;
61
62 ~CacheFactory() = default;
63
67 Cache create() const;
68
73 static const std::string& getVersion();
74
77 static const std::string& getProductDescription();
78
100 CacheFactory& setPdxIgnoreUnreadFields(bool ignore);
101
108 CacheFactory& setAuthInitialize(
109 const std::shared_ptr<AuthInitialize>& authInitialize);
110
129 CacheFactory& setPdxReadSerialized(bool pdxReadSerialized);
130
138 CacheFactory& set(std::string name, std::string value);
139
140 private:
141 std::shared_ptr<Properties> dsProp;
142 bool ignorePdxUnreadFields;
143 bool pdxReadSerialized;
144 std::shared_ptr<AuthInitialize> authInitialize;
145
146 friend class CppCacheLibrary;
147 friend class RegionFactory;
148 friend class RegionXmlCreation;
149 friend class CacheXmlCreation;
150};
151
152} // namespace client
153} // namespace geode
154} // namespace apache
155
156#endif // GEODE_CACHEFACTORY_H_
Specifies the mechanism to obtain credentials for a client.
Definition AuthInitialize.hpp:49
Caches are obtained from the create method on the CacheFactory#create class.
Definition Cache.hpp:65
Top level class for configuring and using Geode on a client.This should be called once to create Cach...
Definition CacheFactory.hpp:48
CacheFactory() noexcept
To create the instance of CacheFactory.
Contains a set of (key, value) pair properties with key being the name of the property; value,...
Definition Properties.hpp:52
Provides for the configuration and creation of instances of Region.
Definition RegionFactory.hpp:43

Apache Geode C++ Cache API Documentation