ddc
Public Member Functions | Public Attributes | List of all members
CDDCServerOptions Class Reference

#include <ServerOptions.h>

Collaboration diagram for CDDCServerOptions:
Collaboration graph
[legend]

Public Member Functions

 CDDCServerOptions ()
 
void LoadFile (const string &Filename)
 
void LoadString (const string &Options, const string &srcName="String")
 
void LoadLines (const vector< string > &Lines, const string &srcName="Lines")
 
bool Set (const string &Option, const string &Value="", const string &srcName="Option")
 
string toString () const
 

Public Attributes

DDCLogLevel m_LogLevel
 
double m_SlowQueryTimeout
 
size_t m_nWorkers
 
size_t m_ThreadQueueSize
 
bool m_bHitStringsParallel
 
size_t m_NavCacheSize
 
size_t m_NavCacheStep
 
DDCVersionT m_VersionCompat
 
mode_t m_UnixSocketPerms
 

Detailed Description

class for storing common server options (ddc_server.rc)

Constructor & Destructor Documentation

◆ CDDCServerOptions()

CDDCServerOptions::CDDCServerOptions ( )

default constructor

Member Function Documentation

◆ LoadFile()

void CDDCServerOptions::LoadFile ( const string &  Filename)

load server-options file file RCFILE

References Format(), LoadFileToString(), LoadString(), and StrError().

Referenced by main(), and Set().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadString()

void CDDCServerOptions::LoadString ( const string &  Options,
const string &  srcName = "String" 
)

set server-options from a monolithic string

References LoadLines(), and stringSplitE().

Referenced by LoadFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadLines()

void CDDCServerOptions::LoadLines ( const vector< string > &  Lines,
const string &  srcName = "Lines" 
)

set server-options from a c++ vector

References ddcLogWarn, Format(), and Set().

Referenced by LoadString().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Set()

bool CDDCServerOptions::Set ( const string &  Option,
const string &  Value = "",
const string &  srcName = "Option" 
)

set a single option value

Parameters
Optionname of the option to set
Valueoption value
srcNamename of source (for complaints)
LineNosource line number
Returns
true on success, false for unknown options

References ddcLogWarn, EngMakeLower(), Format(), DDCVersionT::fromString(), GetLogLevel(), LoadFile(), m_bHitStringsParallel, m_LogLevel, m_NavCacheSize, m_NavCacheStep, m_nWorkers, m_SlowQueryTimeout, m_ThreadQueueSize, m_UnixSocketPerms, m_VersionCompat, RelativeFileName(), StringToBool(), TrimSafe(), and unescapeCString().

Referenced by LoadLines().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

string CDDCServerOptions::toString ( void  ) const

convert to a string representation

References BoolToString(), Format(), LogLevelName(), m_bHitStringsParallel, m_LogLevel, m_NavCacheSize, m_NavCacheStep, m_nWorkers, m_SlowQueryTimeout, m_ThreadQueueSize, m_UnixSocketPerms, m_VersionCompat, and DDCVersionT::str().

Referenced by do_start().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_LogLevel

DDCLogLevel CDDCServerOptions::m_LogLevel

default log level (clobbers global ddcLogLevel if anything other than ddcLLUnknown)

Referenced by do_start(), Set(), CDDCServer::SetOptions(), and toString().

◆ m_SlowQueryTimeout

double CDDCServerOptions::m_SlowQueryTimeout

upper-bound in seconds for "slow" queries (default=10); see CDDCServer::m_SlowQueryTimeout

Referenced by Set(), CDDCServer::SetOptions(), and toString().

◆ m_nWorkers

size_t CDDCServerOptions::m_nWorkers

number of client-thread workers for thread pool (default=0: serial mode)

Referenced by main(), Set(), CDDCServer::SetOptions(), and toString().

◆ m_ThreadQueueSize

size_t CDDCServerOptions::m_ThreadQueueSize

maximum number of pending client connections the thread-pool queue (min=1: use tcp queueing only; default=DDC_DEFAULT_THREAD_QUEUE_SIZE)

Referenced by Set(), CDDCServer::SetOptions(), and toString().

◆ m_bHitStringsParallel

bool CDDCServerOptions::m_bHitStringsParallel

should branch server send "get_hit_strings" requests in parallel? (default=false)

Referenced by Set(), CDDCBranchServer::SetOptions(), and toString().

◆ m_NavCacheSize

size_t CDDCServerOptions::m_NavCacheSize

size of navigation hint cache (branch servers only)

Referenced by Set(), CDDCBranchServer::SetOptions(), and toString().

◆ m_NavCacheStep

size_t CDDCServerOptions::m_NavCacheStep

minimum logical offset increment for navigation hint cache (branch servers only)

Referenced by Set(), CDDCBranchServer::SetOptions(), and toString().

◆ m_VersionCompat

DDCVersionT CDDCServerOptions::m_VersionCompat

server compatibility mode

Referenced by do_start(), Set(), CDDCServer::SetOptions(), and toString().

◆ m_UnixSocketPerms

mode_t CDDCServerOptions::m_UnixSocketPerms

The documentation for this class was generated from the following files: