4#ifndef CLIENT_SETTINGS_H
5#define CLIENT_SETTINGS_H
7#include "StreamBase.hpp"
9#include "NMSTL/ntime.hpp"
34 _openTimeout = tupleOpenTimeout;
63 _writeTimeout = tupleWriteTimeout;
73 return _xmlrpcTimeout;
82 _xmlrpcTimeout = xmlrpcTimeout;
93 return _reconnectSleep;
102 _reconnectSleep = reconnectSleep;
111 return _heartbeatTimeout;
120 _heartbeatTimeout = heartbeatTimeout;
130 return _exitStatusTimeout;
140 _exitStatusTimeout = exitStatusTimeout;
149 return _maxInputPacketSize;
158 _maxInputPacketSize = maxInputPacketSize;
166 return _checkClientExitStatus;
177 _maxDequeuerQueueSize = maxDequeuerQueueSize;
187 _tcpNoDelay = tcpNoDelay;
198 unsigned int getMaxTupleBufferCacheSize() {
199 return _maxTupleBufferCacheSize;
202 unsigned int getMaxDequeuerQueueSize() {
203 return _maxDequeuerQueueSize;
207 NMSTL::Time _reconnectSleep;
208 NMSTL::Time _openTimeout;
209 NMSTL::Time _writeTimeout;
210 NMSTL::Time _xmlrpcTimeout;
211 NMSTL::Time _heartbeatTimeout;
212 NMSTL::Time _exitStatusTimeout;
213 unsigned int _maxInputPacketSize;
214 bool _checkClientExitStatus;
216 unsigned int _maxTupleBufferCacheSize;
217 unsigned int _maxDequeuerQueueSize;
This class loads all the environment variables used by the C++ client API.
Definition: ClientSettings.hpp:20
NMSTL::Time getOpenTimeout()
Get the timeout used when opening a connection.
Definition: ClientSettings.hpp:43
void setWriteTimeout(const NMSTL::Time &tupleWriteTimeout)
Set the timeout used when writing to a connection.
Definition: ClientSettings.hpp:62
void setReconnectSleep(const NMSTL::Time &reconnectSleep)
Set the amount of time to sleep between reconnect requests.
Definition: ClientSettings.hpp:101
void setMaxInputPacketSize(unsigned int maxInputPacketSize)
Set the maximum size of the input tuple in binary mode.
Definition: ClientSettings.hpp:157
bool checkClientExitStatus()
Should we check the client exit status.
Definition: ClientSettings.hpp:165
NMSTL::Time getReconnectSleep()
Get the amount of time to sleep between reconnect requests.
Definition: ClientSettings.hpp:92
void setOpenTimeout(const NMSTL::Time &tupleOpenTimeout)
Set the timeout used when opening a binary connection.
Definition: ClientSettings.hpp:33
NMSTL::Time getXmlRpcTimeout()
Get the timeout used when making an xmlrpc request.
Definition: ClientSettings.hpp:72
ClientSettings(bool haModeOn)
Loads all the client settings.
void setHeartbeatTimeout(const NMSTL::Time &heartbeatTimeout)
Set the heart beat timeout.
Definition: ClientSettings.hpp:119
void setTcpNoDelay(bool tcpNoDelay)
Enable/disable TCP_NO_DELAY.
Definition: ClientSettings.hpp:186
NMSTL::Time getHeartbeatTimeout()
Get the heart beat timeout.
Definition: ClientSettings.hpp:110
bool tcpNoDelay()
Is TCP_NODELAY set.
Definition: ClientSettings.hpp:194
unsigned int getMaxInputPacketSize()
Get the maximum size of the input tuple in binary mode.
Definition: ClientSettings.hpp:148
void setExitStatusTimeout(const NMSTL::Time &exitStatusTimeout)
Set the timeout used when sending a request to the server to get the clients exit status.
Definition: ClientSettings.hpp:139
void setXmlRpcTimeout(const NMSTL::Time &xmlrpcTimeout)
Set the timeout used when making an xmlrpc request.
Definition: ClientSettings.hpp:81
NMSTL::Time getWriteTimeout()
Get the timeout used when writing to a connection.
Definition: ClientSettings.hpp:53
NMSTL::Time getExitStatusTimeout()
Get the timeout used when sending a request to the server to get the clients exit status.
Definition: ClientSettings.hpp:129
void setMaxDequeuerQueueSize(unsigned int maxDequeuerQueueSize)
Set the maximum number of tuples to be kept in the Dequeuer Thread's internal queue before applying b...
Definition: ClientSettings.hpp:176