![]() |
ROOT 6.12/07 Reference Guide |
Definition at line 110 of file XrdProofdProofServ.h.
Public Member Functions | |
XrdProofdProofServ () | |
Constructor. More... | |
~XrdProofdProofServ () | |
Destructor. More... | |
void | AddWorker (const char *o, XrdProofWorker *w) |
Add a worker assigned to this session with label 'o'. More... | |
const char * | AdminPath () const |
const char * | Alias () const |
void | Broadcast (const char *msg, int type=kXPD_srvmsg) |
Broadcast message 'msg' at 'type' to the attached clients. More... | |
int | BroadcastPriority (int priority) |
Broadcast a new group priority value to the worker servers. More... | |
int | CheckSession (bool oldvers, bool isrec, int shutopt, int shutdel, bool changeown, int &nc) |
Calculate the effective number of users on this session nodes and communicate it to the master together with the total number of sessions and the number of active sessions. More... | |
const char * | Client () const |
int | CreateUNIXSock (XrdSysError *edest) |
Create UNIX socket for internal connections. More... | |
XrdProofQuery * | CurrentQuery () |
void | DeleteStartMsg () |
void | DeleteUNIXSock () |
Delete the current UNIX socket. More... | |
int | DisconnectTime () |
Return the time (in secs) all clients have been disconnected. More... | |
void | DumpQueries () |
Export the assigned workers in the format understood by proofserv. More... | |
int | Enqueue (XrdProofQuery *q) |
void | ExportBuf (XrdOucString &buf) |
Fill buf with relevant info about this session. More... | |
void | ExportWorkers (XrdOucString &wrks) |
Export the assigned workers in the format understood by proofserv. More... | |
const char * | Fileout () const |
int | FreeClientID (int pid) |
Free instance corresponding to protocol connecting process 'pid'. More... | |
XrdClientID * | GetClientID (int cid) |
Get instance corresponding to cid. More... | |
int | GetNClients (bool check) |
Get the number of connected clients. More... | |
XrdProofQuery * | GetQuery (const char *tag) |
Get query with tag form the list of queries. More... | |
const char * | Group () const |
short int | ID () const |
int | IdleTime () |
Return the time (in secs) the session has been idle. More... | |
bool | IsPLite () const |
bool | IsShutdown () const |
bool | IsValid () const |
bool | Match (short int id) const |
const char * | Ordinal () const |
XrdClientID * | Parent () const |
void | PingSem () const |
int | PLiteNWrks () const |
XrdProofdProtocol * | Protocol () const |
std::list< XrdProofQuery * > * | Queries () const |
void | RemoveQuery (const char *tag) |
remove query with tag form the list of queries More... | |
void | RemoveWorker (const char *o) |
Release worker assigned to this session with label 'o'. More... | |
void | Reset () |
Reset this instance. More... | |
int | Reset (const char *msg, int type) |
Reset this instance, broadcasting a message to the clients. More... | |
XrdProofdResponse * | Response () const |
int | Resume () |
Send a resume message to the this session. More... | |
XrdROOT * | ROOT () const |
void | SendClusterInfo (int nsess, int nacti) |
Calculate the effective number of users on this session nodes and communicate it to the master together with the total number of sessions and the number of active sessions. More... | |
int | SendData (int cid, void *buff, int len) |
Send data to client cid. More... | |
int | SendDataN (void *buff, int len) |
Send data over the open client links of this session. More... | |
int | SetAdminPath (const char *a, bool assert, bool setown) |
Set the admin path and make sure the file exists. More... | |
void | SetAlias (const char *a) |
void | SetClient (const char *c) |
void | SetConnection (XrdProofdResponse *r) |
void | SetFileout (const char *f) |
void | SetGroup (const char *g) |
void | SetID (short int id) |
void | SetIdle () |
Set status to idle and update the related time stamp. More... | |
void | SetOrdinal (const char *o) |
void | SetParent (XrdClientID *cid) |
void | SetPLiteNWrks (int n) |
void | SetProtocol (XrdProofdProtocol *p) |
void | SetProtVer (int pv) |
void | SetROOT (XrdROOT *r) |
void | SetRunning () |
Set status to running and reset the related time stamp. More... | |
void | SetShutdown () |
void | SetSkipCheck () |
void | SetSrvPID (int pid) |
void | SetSrvType (int id) |
void | SetStartMsg (XrdSrvBuffer *sm) |
void | SetStatus (int st) |
void | SetTag (const char *t) |
void | SetUNIXSockPath (const char *s) |
void | SetUserEnvs (const char *t) |
void | SetValid (bool valid=1) |
bool | SkipCheck () |
Return the value of fSkipCheck and reset it to false. More... | |
int | SrvPID () const |
int | SrvType () const |
XrdSrvBuffer * | StartMsg () const |
int | Status () const |
const char * | Tag () const |
int | TerminateProofServ (bool changeown) |
Terminate the associated process. More... | |
XrdNet * | UNIXSock () const |
const char * | UNIXSockPath () const |
const char * | UserEnvs () const |
int | VerifyProofServ (bool fw) |
Check if the associated proofserv process is alive. More... | |
XrdOucHash< XrdProofWorker > * | Workers () const |
Private Member Functions | |
void | ClearWorkers () |
Decrease worker counters and clean-up the list. More... | |
void | CreatePingSem () |
void | DeletePingSem () |
Private Attributes | |
XrdOucString | fAdminPath |
XrdOucString | fAlias |
XrdOucString | fClient |
std::vector< XrdClientID * > | fClients |
time_t | fDisconnectTime |
XrdOucString | fFileout |
XrdOucString | fGroup |
short int | fID |
bool | fIsShutdown |
bool | fIsValid |
XrdSysRecMutex * | fMutex |
int | fNClients |
XrdOucString | fOrdinal |
XrdClientID * | fParent |
XrdSysSemWait * | fPingSem |
int | fPLiteNWrks |
XrdProofdProtocol * | fProtocol |
char | fProtVer |
std::list< XrdProofQuery * > | fQueries |
XrdProofdResponse * | fResponse |
XrdROOT * | fROOT |
time_t | fSetIdleTime |
bool | fSkipCheck |
int | fSrvPID |
int | fSrvType |
XrdSrvBuffer * | fStartMsg |
int | fStatus |
XrdOucString | fTag |
XrdNet * | fUNIXSock |
XrdOucString | fUNIXSockPath |
XrdOucString | fUserEnvs |
XrdOucHash< XrdProofWorker > | fWorkers |
#include <XrdProofdProofServ.h>
XrdProofdProofServ::XrdProofdProofServ | ( | ) |
Constructor.
Definition at line 27 of file XrdProofdProofServ.cxx.
XrdProofdProofServ::~XrdProofdProofServ | ( | ) |
Destructor.
Definition at line 66 of file XrdProofdProofServ.cxx.
void XrdProofdProofServ::AddWorker | ( | const char * | o, |
XrdProofWorker * | w | ||
) |
Add a worker assigned to this session with label 'o'.
Definition at line 141 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 118 of file XrdProofdProofServ.h.
|
inline |
Definition at line 119 of file XrdProofdProofServ.h.
void XrdProofdProofServ::Broadcast | ( | const char * | msg, |
int | type = kXPD_srvmsg |
||
) |
Broadcast message 'msg' at 'type' to the attached clients.
Definition at line 452 of file XrdProofdProofServ.cxx.
int XrdProofdProofServ::BroadcastPriority | ( | int | priority | ) |
Broadcast a new group priority value to the worker servers.
Called by masters.
Definition at line 568 of file XrdProofdProofServ.cxx.
int XrdProofdProofServ::CheckSession | ( | bool | oldvers, |
bool | isrec, | ||
int | shutopt, | ||
int | shutdel, | ||
bool | changeown, | ||
int & | nc | ||
) |
Calculate the effective number of users on this session nodes and communicate it to the master together with the total number of sessions and the number of active sessions.
for monitoring issues.
Definition at line 1016 of file XrdProofdProofServ.cxx.
|
private |
Decrease worker counters and clean-up the list.
Definition at line 129 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 122 of file XrdProofdProofServ.h.
|
inlineprivate |
Definition at line 255 of file XrdProofdProofServ.h.
int XrdProofdProofServ::CreateUNIXSock | ( | XrdSysError * | edest | ) |
Create UNIX socket for internal connections.
Definition at line 691 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 125 of file XrdProofdProofServ.h.
|
inlineprivate |
Definition at line 257 of file XrdProofdProofServ.h.
|
inline |
Definition at line 126 of file XrdProofdProofServ.h.
void XrdProofdProofServ::DeleteUNIXSock | ( | ) |
Delete the current UNIX socket.
Definition at line 255 of file XrdProofdProofServ.cxx.
int XrdProofdProofServ::DisconnectTime | ( | ) |
Return the time (in secs) all clients have been disconnected.
Return -1 if the session is running
Definition at line 401 of file XrdProofdProofServ.cxx.
void XrdProofdProofServ::DumpQueries | ( | ) |
Export the assigned workers in the format understood by proofserv.
Definition at line 883 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 130 of file XrdProofdProofServ.h.
void XrdProofdProofServ::ExportBuf | ( | XrdOucString & | buf | ) |
Fill buf with relevant info about this session.
Definition at line 668 of file XrdProofdProofServ.cxx.
void XrdProofdProofServ::ExportWorkers | ( | XrdOucString & | wrks | ) |
Export the assigned workers in the format understood by proofserv.
Definition at line 873 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 134 of file XrdProofdProofServ.h.
int XrdProofdProofServ::FreeClientID | ( | int | pid | ) |
Free instance corresponding to protocol connecting process 'pid'.
Definition at line 331 of file XrdProofdProofServ.cxx.
XrdClientID * XrdProofdProofServ::GetClientID | ( | int | cid | ) |
Get instance corresponding to cid.
Definition at line 277 of file XrdProofdProofServ.cxx.
int XrdProofdProofServ::GetNClients | ( | bool | check | ) |
Get the number of connected clients.
If check is true check that they are still valid ones and free the slots for the invalid ones
Definition at line 380 of file XrdProofdProofServ.cxx.
XrdProofQuery * XrdProofdProofServ::GetQuery | ( | const char * | tag | ) |
Get query with tag form the list of queries.
Definition at line 905 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 139 of file XrdProofdProofServ.h.
|
inline |
Definition at line 141 of file XrdProofdProofServ.h.
int XrdProofdProofServ::IdleTime | ( | ) |
Return the time (in secs) the session has been idle.
Return -1 if the session is running
Definition at line 415 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 142 of file XrdProofdProofServ.h.
|
inline |
Definition at line 143 of file XrdProofdProofServ.h.
|
inline |
Definition at line 144 of file XrdProofdProofServ.h.
|
inline |
Definition at line 145 of file XrdProofdProofServ.h.
|
inline |
Definition at line 146 of file XrdProofdProofServ.h.
|
inline |
Definition at line 147 of file XrdProofdProofServ.h.
|
inline |
Definition at line 148 of file XrdProofdProofServ.h.
|
inline |
Definition at line 149 of file XrdProofdProofServ.h.
|
inline |
Definition at line 150 of file XrdProofdProofServ.h.
|
inline |
Definition at line 151 of file XrdProofdProofServ.h.
void XrdProofdProofServ::RemoveQuery | ( | const char * | tag | ) |
remove query with tag form the list of queries
Definition at line 927 of file XrdProofdProofServ.cxx.
void XrdProofdProofServ::RemoveWorker | ( | const char * | o | ) |
Release worker assigned to this session with label 'o'.
Definition at line 153 of file XrdProofdProofServ.cxx.
Reset this instance.
Definition at line 212 of file XrdProofdProofServ.cxx.
int XrdProofdProofServ::Reset | ( | const char * | msg, |
int | type | ||
) |
Reset this instance, broadcasting a message to the clients.
return 1 if top master, 0 otherwise
Definition at line 173 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 160 of file XrdProofdProofServ.h.
int XrdProofdProofServ::Resume | ( | ) |
Send a resume message to the this session.
It is assumed that the session has at least one async query to process and will immediately send a getworkers request (the workers are already assigned).
Definition at line 816 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 159 of file XrdProofdProofServ.h.
void XrdProofdProofServ::SendClusterInfo | ( | int | nsess, |
int | nacti | ||
) |
Calculate the effective number of users on this session nodes and communicate it to the master together with the total number of sessions and the number of active sessions.
for monitoring issues.
Definition at line 973 of file XrdProofdProofServ.cxx.
int XrdProofdProofServ::SendData | ( | int | cid, |
void * | buff, | ||
int | len | ||
) |
Send data to client cid.
Definition at line 596 of file XrdProofdProofServ.cxx.
int XrdProofdProofServ::SendDataN | ( | void * | buff, |
int | len | ||
) |
Send data over the open client links of this session.
Used when all the connected clients are eligible to receive the message.
Definition at line 640 of file XrdProofdProofServ.cxx.
int XrdProofdProofServ::SetAdminPath | ( | const char * | a, |
bool | assert, | ||
bool | setown | ||
) |
Set the admin path and make sure the file exists.
Definition at line 763 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 165 of file XrdProofdProofServ.h.
|
inline |
Definition at line 166 of file XrdProofdProofServ.h.
|
inline |
Definition at line 167 of file XrdProofdProofServ.h.
|
inline |
Definition at line 169 of file XrdProofdProofServ.h.
|
inline |
Definition at line 170 of file XrdProofdProofServ.h.
|
inline |
Definition at line 172 of file XrdProofdProofServ.h.
void XrdProofdProofServ::SetIdle | ( | ) |
Set status to idle and update the related time stamp.
Definition at line 429 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 173 of file XrdProofdProofServ.h.
|
inline |
Definition at line 174 of file XrdProofdProofServ.h.
|
inline |
Definition at line 175 of file XrdProofdProofServ.h.
|
inline |
Definition at line 176 of file XrdProofdProofServ.h.
|
inline |
Definition at line 177 of file XrdProofdProofServ.h.
Definition at line 178 of file XrdProofdProofServ.h.
void XrdProofdProofServ::SetRunning | ( | ) |
Set status to running and reset the related time stamp.
Definition at line 441 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 180 of file XrdProofdProofServ.h.
|
inline |
Definition at line 181 of file XrdProofdProofServ.h.
|
inline |
Definition at line 182 of file XrdProofdProofServ.h.
|
inline |
Definition at line 183 of file XrdProofdProofServ.h.
|
inline |
Definition at line 184 of file XrdProofdProofServ.h.
|
inline |
Definition at line 185 of file XrdProofdProofServ.h.
|
inline |
Definition at line 186 of file XrdProofdProofServ.h.
|
inline |
Definition at line 187 of file XrdProofdProofServ.h.
|
inline |
Definition at line 188 of file XrdProofdProofServ.h.
|
inline |
Definition at line 189 of file XrdProofdProofServ.h.
bool XrdProofdProofServ::SkipCheck | ( | ) |
Return the value of fSkipCheck and reset it to false.
Definition at line 265 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 191 of file XrdProofdProofServ.h.
|
inline |
Definition at line 192 of file XrdProofdProofServ.h.
|
inline |
Definition at line 193 of file XrdProofdProofServ.h.
|
inline |
Definition at line 194 of file XrdProofdProofServ.h.
|
inline |
Definition at line 195 of file XrdProofdProofServ.h.
int XrdProofdProofServ::TerminateProofServ | ( | bool | changeown | ) |
Terminate the associated process.
A shutdown interrupt message is forwarded. If add is TRUE (default) the pid is added to the list of processes requested to terminate. Return the pid of tyhe terminated process on success, -1 if not allowed or other errors occured.
Definition at line 498 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 205 of file XrdProofdProofServ.h.
|
inline |
Definition at line 206 of file XrdProofdProofServ.h.
|
inline |
Definition at line 197 of file XrdProofdProofServ.h.
int XrdProofdProofServ::VerifyProofServ | ( | bool | forward | ) |
Check if the associated proofserv process is alive.
This is done asynchronously by asking the process to callback and proof its vitality. We do not block here: the caller may setup a waiting structure if required. If forward is true, the process will forward the request to the following tiers. Return 0 if the request was send successfully, -1 in case of error.
Definition at line 529 of file XrdProofdProofServ.cxx.
|
inline |
Definition at line 199 of file XrdProofdProofServ.h.
|
private |
Definition at line 247 of file XrdProofdProofServ.h.
|
private |
Definition at line 242 of file XrdProofdProofServ.h.
|
private |
Definition at line 243 of file XrdProofdProofServ.h.
|
private |
Definition at line 216 of file XrdProofdProofServ.h.
|
private |
Definition at line 223 of file XrdProofdProofServ.h.
|
private |
Definition at line 231 of file XrdProofdProofServ.h.
|
private |
Definition at line 251 of file XrdProofdProofServ.h.
|
private |
Definition at line 229 of file XrdProofdProofServ.h.
|
private |
Definition at line 238 of file XrdProofdProofServ.h.
|
private |
Definition at line 239 of file XrdProofdProofServ.h.
|
private |
Definition at line 210 of file XrdProofdProofServ.h.
|
private |
Definition at line 215 of file XrdProofdProofServ.h.
|
private |
Definition at line 245 of file XrdProofdProofServ.h.
|
private |
Definition at line 214 of file XrdProofdProofServ.h.
|
private |
Definition at line 219 of file XrdProofdProofServ.h.
|
private |
Definition at line 233 of file XrdProofdProofServ.h.
|
private |
Definition at line 211 of file XrdProofdProofServ.h.
|
private |
Definition at line 230 of file XrdProofdProofServ.h.
|
private |
Definition at line 259 of file XrdProofdProofServ.h.
|
private |
Definition at line 212 of file XrdProofdProofServ.h.
|
private |
Definition at line 249 of file XrdProofdProofServ.h.
|
private |
Definition at line 224 of file XrdProofdProofServ.h.
|
private |
Definition at line 240 of file XrdProofdProofServ.h.
|
private |
Definition at line 227 of file XrdProofdProofServ.h.
|
private |
Definition at line 228 of file XrdProofdProofServ.h.
|
private |
Definition at line 221 of file XrdProofdProofServ.h.
|
private |
Definition at line 226 of file XrdProofdProofServ.h.
|
private |
Definition at line 244 of file XrdProofdProofServ.h.
|
private |
Definition at line 235 of file XrdProofdProofServ.h.
|
private |
Definition at line 236 of file XrdProofdProofServ.h.
|
private |
Definition at line 246 of file XrdProofdProofServ.h.
|
private |
Definition at line 217 of file XrdProofdProofServ.h.