pulsar-client-cpp
ClientConfiguration.h
1 
19 #ifndef PULSAR_CLIENTCONFIGURATION_H_
20 #define PULSAR_CLIENTCONFIGURATION_H_
21 
22 #include <pulsar/Authentication.h>
23 #pragma GCC visibility push(default)
24 namespace pulsar {
25 class PulsarWrapper;
26 class ClientConfigurationImpl;
28  public:
29 
33  ClientConfiguration& operator=(const ClientConfiguration&);
34 
40  ClientConfiguration& setAuth(const AuthenticationPtr& authentication);
41 
45  const Authentication& getAuth() const;
46 
54 
58  int getOperationTimeoutSeconds() const;
59 
66  ClientConfiguration& setIOThreads(int threads);
67 
71  int getIOThreads() const;
72 
84 
88  int getMessageListenerThreads() const;
89 
97  ClientConfiguration& setConcurrentLookupRequest(int concurrentLookupRequest);
98 
102  int getConcurrentLookupRequest() const;
103 
109  ClientConfiguration& setLogConfFilePath(const std::string& logConfFilePath);
110 
114  const std::string& getLogConfFilePath() const;
115 
116  ClientConfiguration& setUseTls(bool useTls);
117  bool isUseTls() const;
118 
119  ClientConfiguration& setTlsTrustCertsFilePath(const std::string &tlsTrustCertsFilePath);
120  std::string getTlsTrustCertsFilePath() const;
121 
122  ClientConfiguration& setTlsAllowInsecureConnection(bool allowInsecure);
123  bool isTlsAllowInsecureConnection() const;
124 
125  /*
126  * Initialize stats interval in seconds. Stats are printed and reset after every 'statsIntervalInSeconds'.
127  * Set to 0 in order to disable stats collection.
128  */
129  ClientConfiguration& setStatsIntervalInSeconds(const unsigned int&);
130 
131  /*
132  * Get the stats interval set in the client.
133  */
134  const unsigned int& getStatsIntervalInSeconds() const;
135 
136  friend class ClientImpl;
137  friend class PulsarWrapper;
138 
139  private:
140  const AuthenticationPtr& getAuthPtr() const;
141  boost::shared_ptr<ClientConfigurationImpl> impl_;
142 };
143 }
144 
145 #pragma GCC visibility pop
146 #endif /* PULSAR_CLIENTCONFIGURATION_H_ */
147 
const Authentication & getAuth() const
Definition: Authentication.h:31
ClientConfiguration & setConcurrentLookupRequest(int concurrentLookupRequest)
int getMessageListenerThreads() const
ClientConfiguration & setOperationTimeoutSeconds(int timeout)
ClientConfiguration & setMessageListenerThreads(int threads)
Definition: Authentication.h:55
ClientConfiguration & setLogConfFilePath(const std::string &logConfFilePath)
ClientConfiguration & setAuth(const AuthenticationPtr &authentication)
int getOperationTimeoutSeconds() const
const std::string & getLogConfFilePath() const
int getConcurrentLookupRequest() const
Definition: ClientConfiguration.h:27
ClientConfiguration & setIOThreads(int threads)