pulsar-client-cpp
Loading...
Searching...
No Matches
ClientConfiguration.h
1
19#ifndef PULSAR_CLIENTCONFIGURATION_H_
20#define PULSAR_CLIENTCONFIGURATION_H_
21
22#include <pulsar/defines.h>
23#include <pulsar/Authentication.h>
24#include <pulsar/Logger.h>
25
26namespace pulsar {
27class PulsarWrapper;
28struct ClientConfigurationImpl;
29class PULSAR_PUBLIC ClientConfiguration {
30 public:
35
42 ClientConfiguration& setMemoryLimit(uint64_t memoryLimitBytes);
43
47 uint64_t getMemoryLimit() const;
48
54 ClientConfiguration& setAuth(const AuthenticationPtr& authentication);
55
60
68
73
81
85 int getIOThreads() const;
86
98
103
112 ClientConfiguration& setConcurrentLookupRequest(int concurrentLookupRequest);
113
118
125 ClientConfiguration& setLogConfFilePath(const std::string& logConfFilePath);
126
130 const std::string& getLogConfFilePath() const;
131
144
153
157 bool isUseTls() const;
158
164 ClientConfiguration& setTlsPrivateKeyFilePath(const std::string& tlsKeyFilePath);
165
169 const std::string& getTlsPrivateKeyFilePath() const;
170
176 ClientConfiguration& setTlsCertificateFilePath(const std::string& tlsCertificateFilePath);
177
181 const std::string& getTlsCertificateFilePath() const;
182
188 ClientConfiguration& setTlsTrustCertsFilePath(const std::string& tlsTrustCertsFilePath);
189
193 const std::string& getTlsTrustCertsFilePath() const;
194
203
208
223
227 bool isValidateHostName() const;
228
234 ClientConfiguration& setListenerName(const std::string& listenerName);
235
239 const std::string& getListenerName() const;
240
249
253 const unsigned int& getStatsIntervalInSeconds() const;
254
264 ClientConfiguration& setPartititionsUpdateInterval(unsigned int intervalInSeconds);
265
269 unsigned int getPartitionsUpdateInterval() const;
270
281
286
287 friend class ClientImpl;
288 friend class PulsarWrapper;
289
290 private:
291 const AuthenticationPtr& getAuthPtr() const;
292 std::shared_ptr<ClientConfigurationImpl> impl_;
293};
294} // namespace pulsar
295
296#endif /* PULSAR_CLIENTCONFIGURATION_H_ */
Definition: Authentication.h:87
Definition: ClientConfiguration.h:29
ClientConfiguration & setStatsIntervalInSeconds(const unsigned int &)
ClientConfiguration & setValidateHostName(bool validateHostName)
bool isTlsAllowInsecureConnection() const
ClientConfiguration & setLogger(LoggerFactory *loggerFactory)
const std::string & getTlsTrustCertsFilePath() const
ClientConfiguration & setAuth(const AuthenticationPtr &authentication)
const std::string & getListenerName() const
Authentication & getAuth() const
ClientConfiguration & setLogConfFilePath(const std::string &logConfFilePath)
const unsigned int & getStatsIntervalInSeconds() const
const std::string & getTlsCertificateFilePath() const
ClientConfiguration & setPartititionsUpdateInterval(unsigned int intervalInSeconds)
ClientConfiguration & setMessageListenerThreads(int threads)
ClientConfiguration & setTlsTrustCertsFilePath(const std::string &tlsTrustCertsFilePath)
ClientConfiguration & setConnectionTimeout(int timeoutMs)
ClientConfiguration & setIOThreads(int threads)
int getOperationTimeoutSeconds() const
ClientConfiguration & setTlsCertificateFilePath(const std::string &tlsCertificateFilePath)
int getMessageListenerThreads() const
const std::string & getTlsPrivateKeyFilePath() const
ClientConfiguration & setTlsPrivateKeyFilePath(const std::string &tlsKeyFilePath)
ClientConfiguration & setConcurrentLookupRequest(int concurrentLookupRequest)
unsigned int getPartitionsUpdateInterval() const
ClientConfiguration & setTlsAllowInsecureConnection(bool allowInsecure)
uint64_t getMemoryLimit() const
int getConcurrentLookupRequest() const
const std::string & getLogConfFilePath() const
ClientConfiguration & setOperationTimeoutSeconds(int timeout)
ClientConfiguration & setListenerName(const std::string &listenerName)
ClientConfiguration & setMemoryLimit(uint64_t memoryLimitBytes)
ClientConfiguration & setUseTls(bool useTls)
Definition: Logger.h:57
Definition: Authentication.h:30