Apache Ignite C++
ignite_client_configuration.h
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 
23 #ifndef _IGNITE_THIN_IGNITE_CLIENT_CONFIGURATION
24 #define _IGNITE_THIN_IGNITE_CLIENT_CONFIGURATION
25 
26 #include <string>
27 
28 #include <ignite/thin/ssl_mode.h>
29 
30 namespace ignite
31 {
32  namespace thin
33  {
40  {
41  public:
48  sslMode(SslMode::DISABLE),
49  partitionAwareness(false)
50  {
51  // No-op.
52  }
53 
59  const std::string& GetEndPoints() const
60  {
61  return endPoints;
62  }
63 
74  void SetEndPoints(const std::string& endPoints)
75  {
76  this->endPoints = endPoints;
77  }
78 
84  const std::string& GetUser() const
85  {
86  return user;
87  }
88 
94  void SetUser(const std::string& user)
95  {
96  this->user = user;
97  }
98 
104  const std::string& GetPassword() const
105  {
106  return password;
107  }
108 
114  void SetPassword(const std::string& password)
115  {
116  this->password = password;
117  }
118 
127  {
128  return sslMode;
129  }
130 
138  void SetSslMode(SslMode::Type sslMode)
139  {
140  this->sslMode = sslMode;
141  }
142 
148  const std::string& GetSslCertFile() const
149  {
150  return sslCertFile;
151  }
152 
158  void SetSslCertFile(const std::string& sslCertFile)
159  {
160  this->sslCertFile = sslCertFile;
161  }
162 
168  const std::string& GetSslKeyFile() const
169  {
170  return sslKeyFile;
171  }
172 
178  void SetSslKeyFile(const std::string& sslKeyFile)
179  {
180  this->sslKeyFile = sslKeyFile;
181  }
182 
189  const std::string& GetSslCaFile() const
190  {
191  return sslCaFile;
192  }
193 
200  void SetSslCaFile(const std::string& sslCaFile)
201  {
202  this->sslCaFile = sslCaFile;
203  }
204 
216  void SetPartitionAwareness(bool enable)
217  {
218  partitionAwareness = enable;
219  }
220 
228  bool IsPartitionAwareness() const
229  {
230  return partitionAwareness;
231  }
232 
233  private:
235  std::string endPoints;
236 
238  std::string user;
239 
241  std::string password;
242 
244  SslMode::Type sslMode;
245 
247  std::string sslCertFile;
248 
250  std::string sslKeyFile;
251 
253  std::string sslCaFile;
254 
256  bool partitionAwareness;
257  };
258  }
259 }
260 #endif // _IGNITE_THIN_IGNITE_CLIENT_CONFIGURATION
void SetSslCertFile(const std::string &sslCertFile)
Set file path to SSL certificate to use during connection establishment.
Definition: ignite_client_configuration.h:158
void SetPartitionAwareness(bool enable)
Set Partition Awareness.
Definition: ignite_client_configuration.h:216
const std::string & GetSslCaFile() const
Get file path to SSL certificate authority to authenticate server certificate during connection estab...
Definition: ignite_client_configuration.h:189
const std::string & GetSslKeyFile() const
Get file path to SSL private key to use during connection establishment.
Definition: ignite_client_configuration.h:168
Declares ignite::thin::SslMode.
const std::string & GetSslCertFile() const
Get file path to SSL certificate to use during connection establishment.
Definition: ignite_client_configuration.h:148
bool IsPartitionAwareness() const
Get Partition Awareness flag.
Definition: ignite_client_configuration.h:228
void SetSslMode(SslMode::Type sslMode)
Set SSL mode.
Definition: ignite_client_configuration.h:138
IgniteClientConfiguration()
Default constructor.
Definition: ignite_client_configuration.h:47
void SetUser(const std::string &user)
Set user name to use for the authentication.
Definition: ignite_client_configuration.h:94
void SetSslKeyFile(const std::string &sslKeyFile)
Set file path to SSL private key to use during connection establishment.
Definition: ignite_client_configuration.h:178
SSL Mode.
Definition: ssl_mode.h:31
const std::string & GetPassword() const
Get password used for the authentication.
Definition: ignite_client_configuration.h:104
void SetSslCaFile(const std::string &sslCaFile)
Set file path to SSL certificate authority to authenticate server certificate during connection estab...
Definition: ignite_client_configuration.h:200
Ignite thin client configuration.
Definition: ignite_client_configuration.h:39
SslMode::Type GetSslMode() const
Get SSL mode.
Definition: ignite_client_configuration.h:126
Type
Definition: ssl_mode.h:33
void SetPassword(const std::string &password)
Set password to use for the authentication.
Definition: ignite_client_configuration.h:114
const std::string & GetEndPoints() const
Get server end points.
Definition: ignite_client_configuration.h:59
const std::string & GetUser() const
Get user name used for the authentication.
Definition: ignite_client_configuration.h:84
Apache Ignite API.
Definition: cache.h:48
void SetEndPoints(const std::string &endPoints)
Set addresses of the remote servers to connect.
Definition: ignite_client_configuration.h:74