![]() |
XRootD
|
Public Member Functions | |
XrdSsiClientProvider () | |
virtual | ~XrdSsiClientProvider () |
XrdSsiService * | GetService (XrdSsiErrInfo &eInfo, const std::string &contact, int oHold=256) |
virtual bool | Init (XrdSsiLogger *logP, XrdSsiCluster *clsP, std::string cfgFn, std::string parms, int argc, char **argv) |
virtual rStat | QueryResource (const char *rName, const char *contact=0) |
virtual void | SetCBThreads (int cbNum, int ntNum) |
virtual bool | SetConfig (XrdSsiErrInfo &eInfo, std::string &optname, int optvalue) |
virtual void | SetSpread (short ssz) |
virtual void | SetTimeout (tmoType what, int tmoval) |
![]() | |
XrdSsiProvider () | |
Constructor. More... | |
virtual int | Control (CTL_Cmd cmd, const void *argP, void *&resP) |
int | GetVersion () |
virtual void | ResourceAdded (const char *rName) |
virtual void | ResourceRemoved (const char *rName) |
Additional Inherited Members | |
![]() | |
enum | CTL_Cmd { CTL_None = 0 } |
enum | rStat { notPresent = 0 , isPresent , isPending } |
enum | tmoType { connect_N =0 , connect_T , idleClose , request_T , response_T , stream_T } |
![]() | |
static const int | SsiVersion = 0x00010000 |
![]() | |
virtual | ~XrdSsiProvider () |
Destructor. The providor object cannot be and never is explicitly deleted. More... | |
Definition at line 99 of file XrdSsiClient.cc.
|
inline |
Definition at line 129 of file XrdSsiClient.cc.
|
inlinevirtual |
Definition at line 130 of file XrdSsiClient.cc.
|
virtual |
Obtain a service object (client-side or server-side).
eInfo | the object where error status is to be placed. |
contact | the point of first contact when processing a request. The contact may be "host:port" where "host" is a DNS name, an IPV4 address (i.e. d.d.d.d), or an IPV6 address (i.e. [x:x:x:x:x:x]), and "port" is either a numeric port number or the service name assigned to the port number. You may specify more than one contact by separating each with a comma (e.g. host1:port,host2:port,...). Each host must be equivalent with respect to request processing. This is a null string if the call is being made server-side. Note that only one service object is obtained by a server. |
oHold | the maximum number of request objects that should be held in reserve for future calls. |
Reimplemented from XrdSsiProvider.
Definition at line 141 of file XrdSsiClient.cc.
References Atomic_GET, XrdSsi::clEnvP, XrdSsi::clMutex, XrdSsi::dsTTLSet, eMsg, XrdNetAddrInfo::fmtName, XrdNetAddrInfo::Format(), XrdCl::DefaultEnv::GetEnv(), XrdSysMutex::Lock(), XrdSsi::Logger, XrdSsi::maxPEL, XrdNetRegistry::pfx, XrdCl::Env::PutInt(), XrdSsi::rDisp, XrdSsi::rDispNone, XrdSsi::rDispRR, XrdNetRegistry::Register(), XrdSsi::reqTOSet, XrdSsi::schedP, XrdSsiErrInfo::Set(), XrdNetAddr::Set(), XrdNetUtils::Singleton(), XrdSsi::strTOSet, and XrdSysMutex::UnLock().
|
inlinevirtual |
Initialize server-side processing. This method is invoked prior to any other method in the XrdSsiProvider object.
logP | pointer to the logger object for message routing. |
clsP | pointer to the cluster management object. This pointer is nil when a service object is being obtained by an unclustered system (i.e. a stand-alone server). |
cfgFn | file path to the the conifiguration file. |
parms | conifiguration parameters, if any. |
argc | The count of command line arguments (always >= 1). |
argv | Pointer to a null terminated array of tokenized command line arguments. These arguments are taken from the command line after the "-+xrdssi" option (see invoking xrootd), if present. The first argument is always the same as argv[0] in main(). |
Implements XrdSsiProvider.
Definition at line 108 of file XrdSsiClient.cc.
|
inlinevirtual |
|
virtual |
Set thread values. This call is deprecated. You should use SetConfig(). This method has no meaning server-side and is ignored.
cbNum | Equivalent to SetConfig("cbThreads", cbNum). |
ntNum | Equivalent to SetConfig("netThreads", ntNum). |
Reimplemented from XrdSsiProvider.
Definition at line 208 of file XrdSsiClient.cc.
References XrdSsi::clMutex, XrdSysMutex::Lock(), XrdSsi::maxCLW, XrdSsi::maxTCB, and XrdSysMutex::UnLock().
|
virtual |
Set a configuration option for execution behaviour.
eInfo | The object where error status is to be placed. |
optname | The name of the option (see table below). |
optvalue | The value to be set for the option. |
The following table list the currently supported keynames and what the value actually does. These options only apply to the client. The options must be set before calling GetService().
cbThreads The maximum number of threads to be used for callbacks and sets the maximum number of active callbacks (default 300). set a value between 1 and 32767. Note: the nproc ulimit is final arbiter of the actual number of threads to use. hiResTime enables the use of a high resolution timer in log message timestamps. The optvalue is immaterial as this simply sets feature on and once set on cannot be set off. netThreads The maximum number of threads to be used to handle network traffic. The minimum is 3, the default is 10% of cbThreads but no more than 100. pollers The number network interrupt pollers to run. Larger values allow the initial fielding of more interrupts. Care must be taken to not overrun netThreads. The default is 3. The suggested maximum is the number of cores. reqDispatch Request dispatch algorithm to use when contact has multiple endpoints. Choose one of: < 0: Random choice each time. = 0: Use DNS order. > 0: Round robbin (the default).
Reimplemented from XrdSsiProvider.
Definition at line 228 of file XrdSsiClient.cc.
References XrdSsi::clMutex, XrdSsi::hiResTime, XrdSysMutex::Lock(), XrdSsi::maxCLW, XrdSsi::maxPEL, XrdSsi::maxTCB, XrdSsi::rDisp, XrdSsi::rDispNone, XrdSsi::rDispRand, XrdSsi::rDispRR, XrdSsiErrInfo::Set(), and XrdSysMutex::UnLock().
|
virtual |
Set the client-size request spread size.
ssz | The spread value which may be <0, -0, or >0: >0 The maximum number of connections to use to to handle requests. No more or less are used until reset. =0 Turns on auto-tuning using curent setting. The initial default is 4. The size is automatically increased to accomodate the number of simultaeous requests. <0 Turns on auto-tuning using curent setting using the abs(sval) as the new spread value. The size is The size is automatically increased to accomodate the number of simultaeous requests. |
Reimplemented from XrdSsiProvider.
Definition at line 345 of file XrdSsiClient.cc.
References XrdSsiScale::setSpread(), and XrdSsi::sidScale.
|
virtual |
Reimplemented from XrdSsiProvider.
Definition at line 354 of file XrdSsiClient.cc.
References XrdSsi::clEnvP, XrdSsi::clMutex, XrdSsi::dsTTLSet, XrdCl::DefaultEnv::GetEnv(), XrdSysMutex::Lock(), XrdCl::Env::PutInt(), XrdSsi::reqTOSet, XrdSsi::strTOSet, and XrdSysMutex::UnLock().