ROOT
6.06/09
Reference Guide
|
Definition at line 43 of file XrdProofdClient.h.
Public Member Functions | |
XrdProofdClient (XrdProofUI ui, bool master, bool changeown, XrdSysError *edest, const char *tmp, int rtime) | |
Constructor. More... | |
virtual | ~XrdProofdClient () |
Destructor. More... | |
const char * | Group () const |
const char * | User () const |
bool | IsValid () const |
bool | Match (const char *usr, const char *grp=0) |
return TRUE if this instance matches 'id' (and 'grp', if defined) More... | |
XrdSysRecMutex * | Mutex () const |
XrdROOT * | ROOT () const |
XrdProofdSandbox * | Sandbox () const |
XrdProofUI | UI () const |
XrdProofdProofServ * | GetServer (int psid) |
Get from the vector server instance with ID psid. More... | |
XrdProofdProofServ * | GetServer (XrdProofdProtocol *p) |
Get server instance connected via 'p'. More... | |
void | EraseServer (int psid) |
Erase server with id psid from the list. More... | |
int | GetTopServers () |
Return the number of valid proofserv topmaster sessions in the list. More... | |
int | ResetClientSlot (int ic) |
Reset slot at 'ic'. More... | |
XrdProofdProtocol * | GetProtocol (int ic) |
Return protocol attached to client slot at 'ic'. More... | |
int | GetClientID (XrdProofdProtocol *p) |
Get next free client ID. More... | |
int | ReserveClientID (int cid) |
Reserve a client ID. More... | |
int | SetClientID (int cid, XrdProofdProtocol *p) |
Set slot cid to instance 'p'. More... | |
XrdProofdProofServ * | GetFreeServObj () |
Get next free server ID. More... | |
XrdProofdProofServ * | GetServObj (int id) |
Get server at 'id'. If needed, increase the vector size. More... | |
void | Broadcast (const char *msg) |
Broadcast message 'msg' to the connected clients. More... | |
XrdOucString | ExportSessions (XrdOucString &emsg, XrdProofdResponse *r=0) |
Return a string describing the existing sessions. More... | |
void | SkipSessionsCheck (std::list< XrdProofdProofServ * > *active, XrdOucString &emsg, XrdProofdResponse *r=0) |
Skip the next sessions status check. More... | |
void | TerminateSessions (int srvtype, XrdProofdProofServ *ref, const char *msg, XrdProofdPipe *pipe, bool changeown) |
Terminate client sessions; IDs of signalled processes are added to sigpid. More... | |
bool | VerifySession (XrdProofdProofServ *xps, XrdProofdResponse *r=0) |
Quick verification of session 'xps' to avoid attaching clients to non responding sessions. More... | |
void | ResetSessions () |
Reset this instance. More... | |
void | SetGroup (const char *g) |
void | SetROOT (XrdROOT *r) |
void | SetValid (bool valid=1) |
int | Size () const |
int | Touch (bool reset=0) |
Send a touch the connected clients: this will remotely touch the associated TSocket instance and schedule an asynchronous touch of the client admin file. More... | |
int | TrimSessionDirs () |
const char * | AdminPath () const |
Private Attributes | |
XrdSysRecMutex | fMutex |
bool | fChangeOwn |
bool | fIsValid |
bool | fAskedToTouch |
int | fReconnectTimeOut |
XrdProofUI | fUI |
XrdROOT * | fROOT |
XrdProofdSandbox | fSandbox |
XrdOucString | fAdminPath |
std::vector< XrdProofdProofServ * > | fProofServs |
std::vector< XrdClientID * > | fClients |
#include <XrdProofdClient.h>
XrdProofdClient::XrdProofdClient | ( | XrdProofUI | ui, |
bool | master, | ||
bool | changeown, | ||
XrdSysError * | edest, | ||
const char * | tmp, | ||
int | rtime | ||
) |
Constructor.
Definition at line 37 of file XrdProofdClient.cxx.
|
virtual |
Destructor.
Definition at line 71 of file XrdProofdClient.cxx.
|
inline |
Definition at line 96 of file XrdProofdClient.h.
Referenced by XrdProofdClientMgr::CheckAdminPath(), and XrdProofdClientMgr::CreateAdminPath().
void XrdProofdClient::Broadcast | ( | const char * | msg | ) |
Broadcast message 'msg' to the connected clients.
Definition at line 448 of file XrdProofdClient.cxx.
Referenced by XrdProofdClientMgr::Broadcast(), TerminateSessions(), and XrdProofdClientMgr::TerminateSessions().
void XrdProofdClient::EraseServer | ( | int | psid | ) |
Erase server with id psid from the list.
Definition at line 332 of file XrdProofdClient.cxx.
XrdOucString XrdProofdClient::ExportSessions | ( | XrdOucString & | emsg, |
XrdProofdResponse * | r = 0 |
||
) |
Return a string describing the existing sessions.
Definition at line 619 of file XrdProofdClient.cxx.
Referenced by XrdProofdAdmin::QuerySessions().
int XrdProofdClient::GetClientID | ( | XrdProofdProtocol * | p | ) |
Get next free client ID.
If none is found, increase the vector size and get the first new one
Definition at line 93 of file XrdProofdClient.cxx.
Referenced by XrdProofdClientMgr::MapClient().
XrdProofdProofServ * XrdProofdClient::GetFreeServObj | ( | ) |
Get next free server ID.
If none is found, increase the vector size and get the first new one
Definition at line 182 of file XrdProofdClient.cxx.
Referenced by XrdProofdProofServMgr::PrepareProofServ().
XrdProofdProtocol * XrdProofdClient::GetProtocol | ( | int | ic | ) |
Return protocol attached to client slot at 'ic'.
Definition at line 400 of file XrdProofdClient.cxx.
Referenced by XrdProofdClientMgr::CheckClients().
XrdProofdProofServ * XrdProofdClient::GetServer | ( | int | psid | ) |
Get from the vector server instance with ID psid.
Definition at line 320 of file XrdProofdClient.cxx.
Referenced by XrdProofdProofServMgr::Destroy(), XrdProofdProofServMgr::Detach(), XrdProofdAdmin::GetWorkers(), XrdProofdProtocol::Interrupt(), XrdProofdClientMgr::MapClient(), XrdProofdProtocol::Ping(), XrdProofdAdmin::ReleaseWorker(), XrdProofdProtocol::SendMsg(), XrdProofdAdmin::SetSessionAlias(), XrdProofdAdmin::SetSessionTag(), and XrdProofdProtocol::Urgent().
XrdProofdProofServ * XrdProofdClient::GetServer | ( | XrdProofdProtocol * | p | ) |
Get server instance connected via 'p'.
Definition at line 296 of file XrdProofdClient.cxx.
XrdProofdProofServ * XrdProofdClient::GetServObj | ( | int | id | ) |
Get server at 'id'. If needed, increase the vector size.
Definition at line 234 of file XrdProofdClient.cxx.
Referenced by XrdProofdProofServMgr::ResolveSession().
int XrdProofdClient::GetTopServers | ( | ) |
Return the number of valid proofserv topmaster sessions in the list.
Definition at line 356 of file XrdProofdClient.cxx.
|
inline |
Definition at line 51 of file XrdProofdClient.h.
Referenced by XrdProofdProofServMgr::AddSession(), XrdProofdProofServMgr::Create(), XrdProofdProofServMgr::CreateAdminPath(), XrdProofdProofServMgr::CreateProofServEnvFile(), XrdProofdProofServMgr::CreateProofServRootRc(), Match(), XrdProofdProofServMgr::Recover(), XrdProofdManager::ResolveKeywords(), XrdProofdProofServMgr::SetProofServEnvOld(), and XrdProofSessionInfo::XrdProofSessionInfo().
|
inline |
Definition at line 53 of file XrdProofdClient.h.
Referenced by XrdProofdClientMgr::CheckClient(), XrdProofdClientMgr::GetClient(), GetClientID(), GetFreeServObj(), and XrdProofdClientMgr::MapClient().
bool XrdProofdClient::Match | ( | const char * | usr, |
const char * | grp = 0 |
||
) |
return TRUE if this instance matches 'id' (and 'grp', if defined)
Definition at line 78 of file XrdProofdClient.cxx.
Referenced by XrdProofdClientMgr::GetClient().
|
inline |
Definition at line 55 of file XrdProofdClient.h.
Referenced by XrdProofdProofServMgr::CleanClientSessions(), XrdProofdClientMgr::MapClient(), and XrdProofdProofServMgr::Process().
int XrdProofdClient::ReserveClientID | ( | int | cid | ) |
Reserve a client ID.
If none is found, increase the vector size and performe the needed initializations
Definition at line 145 of file XrdProofdClient.cxx.
Referenced by XrdProofdClientMgr::ParsePreviousClients().
int XrdProofdClient::ResetClientSlot | ( | int | ic | ) |
Reset slot at 'ic'.
Definition at line 380 of file XrdProofdClient.cxx.
Referenced by XrdProofdProtocol::Recycle().
void XrdProofdClient::ResetSessions | ( | ) |
Reset this instance.
Definition at line 693 of file XrdProofdClient.cxx.
Referenced by XrdProofdClientMgr::TerminateSessions().
|
inline |
Definition at line 56 of file XrdProofdClient.h.
Referenced by XrdProofdClientMgr::CheckClient(), XrdProofdProofServMgr::CreateProofServEnvFile(), XrdProofdProofServMgr::CreateProofServRootRc(), XrdProofdProofServMgr::PrepareProofServ(), XrdProofdAdmin::QueryROOTVersions(), XrdProofdProofServMgr::SetProofServEnv(), XrdProofdProofServMgr::SetProofServEnvOld(), and XrdProofdAdmin::SetROOTVersion().
|
inline |
Definition at line 57 of file XrdProofdClient.h.
Referenced by XrdProofdAdmin::CpFile(), XrdProofdProofServMgr::Create(), XrdProofdProofServMgr::CreateProofServEnvFile(), XrdProofdProofServMgr::CreateProofServRootRc(), XrdProofdAdmin::Exec(), XrdProofdAdmin::GetFile(), XrdProofdProofServMgr::GetTagDirs(), XrdProofdAdmin::PutFile(), XrdProofdAdmin::QueryLogPaths(), XrdProofdProofServMgr::SetProofServEnv(), XrdProofdProofServMgr::SetProofServEnvOld(), XrdProofdProofServMgr::SetUserEnvironment(), and XrdProofdProofServMgr::SetUserOwnerships().
int XrdProofdClient::SetClientID | ( | int | cid, |
XrdProofdProtocol * | p | ||
) |
Set slot cid to instance 'p'.
Definition at line 421 of file XrdProofdClient.cxx.
Referenced by XrdProofdClientMgr::MapClient().
|
inline |
Definition at line 85 of file XrdProofdClient.h.
Referenced by XrdProofdClientMgr::CheckClient(), and XrdProofdClientMgr::GetClient().
Definition at line 86 of file XrdProofdClient.h.
Referenced by XrdProofdClientMgr::CheckClient(), and XrdProofdAdmin::SetROOTVersion().
|
inline |
Definition at line 88 of file XrdProofdClient.h.
|
inline |
Definition at line 90 of file XrdProofdClient.h.
Referenced by XrdProofdClientMgr::MapClient().
void XrdProofdClient::SkipSessionsCheck | ( | std::list< XrdProofdProofServ * > * | active, |
XrdOucString & | emsg, | ||
XrdProofdResponse * | r = 0 |
||
) |
Skip the next sessions status check.
This is used, for example, when somebody has shown interest in these sessions to give more time for the reconnection. If active is defined, the list of active sessions is filled.
Definition at line 585 of file XrdProofdClient.cxx.
Referenced by XrdProofdClientMgr::CheckClients(), and ExportSessions().
void XrdProofdClient::TerminateSessions | ( | int | srvtype, |
XrdProofdProofServ * | ref, | ||
const char * | msg, | ||
XrdProofdPipe * | pipe, | ||
bool | changeown | ||
) |
Terminate client sessions; IDs of signalled processes are added to sigpid.
Definition at line 646 of file XrdProofdClient.cxx.
Referenced by XrdProofdProofServMgr::Destroy().
int XrdProofdClient::Touch | ( | bool | reset = 0 | ) |
Send a touch the connected clients: this will remotely touch the associated TSocket instance and schedule an asynchronous touch of the client admin file.
This request is only sent once per client: this is controlled by the flag fAskedToTouch, whcih can reset to FALSE by calling this function with reset TRUE. Return 0 if the request is sent or if asked to reset. Retunn 1 if the request was already sent.
Definition at line 482 of file XrdProofdClient.cxx.
Referenced by XrdProofdClientMgr::CheckClients(), and XrdProofdProtocol::Process2().
|
inline |
Definition at line 94 of file XrdProofdClient.h.
Referenced by XrdProofdClientMgr::GetClient().
|
inline |
Definition at line 58 of file XrdProofdClient.h.
Referenced by XrdProofdProofServMgr::Create(), XrdProofdProofServMgr::CreateProofServEnvFile(), XrdProofdProofServMgr::CreateProofServRootRc(), XrdProofdAdmin::Exec(), XrdProofdProofServMgr::GetTagDirs(), XrdProofdManager::ResolveKeywords(), XrdProofdProtocol::SendMsg(), XrdProofdAdmin::SetGroupProperties(), XrdProofdProofServMgr::SetProofServEnv(), XrdProofdProofServMgr::SetProofServEnvOld(), XrdProofdAdmin::SetROOTVersion(), XrdProofdProofServMgr::SetUserEnvironment(), and XrdProofdProofServMgr::SetUserOwnerships().
|
inline |
Definition at line 52 of file XrdProofdClient.h.
Referenced by XrdProofdProofServMgr::AddSession(), XrdProofdAdmin::CleanupSessions(), XrdProofdProofServMgr::Create(), XrdProofdProofServMgr::CreateAdminPath(), XrdProofdProofServMgr::CreateProofServEnvFile(), XrdProofdProofServMgr::CreateProofServRootRc(), XrdProofdAdmin::Exec(), XrdProofdClientMgr::MapClient(), Match(), XrdProofdProofServMgr::PrepareProofServ(), XrdProofdAdmin::QueryLogPaths(), XrdProofdNetMgr::ReadBuffer(), XrdProofdProofServMgr::Recover(), XrdProofdProtocol::Recycle(), XrdProofdManager::ResolveKeywords(), XrdProofdProofServMgr::SetProofServEnv(), XrdProofdProofServMgr::SetProofServEnvOld(), XrdProofdAdmin::SetROOTVersion(), XrdProofdProofServMgr::SetUserEnvironment(), XrdProofdClientMgr::TerminateSessions(), and XrdProofSessionInfo::XrdProofSessionInfo().
bool XrdProofdClient::VerifySession | ( | XrdProofdProofServ * | xps, |
XrdProofdResponse * | r = 0 |
||
) |
Quick verification of session 'xps' to avoid attaching clients to non responding sessions.
We do here a sort of loose ping. Return true is responding, false otherwise.
Definition at line 517 of file XrdProofdClient.cxx.
Referenced by SkipSessionsCheck().
|
private |
Definition at line 112 of file XrdProofdClient.h.
Referenced by AdminPath(), and XrdProofdClient().
|
private |
Definition at line 104 of file XrdProofdClient.h.
Referenced by ResetSessions(), Touch(), and XrdProofdClient().
|
private |
Definition at line 102 of file XrdProofdClient.h.
Referenced by XrdProofdClient().
|
private |
Definition at line 115 of file XrdProofdClient.h.
Referenced by Broadcast(), GetClientID(), GetProtocol(), ReserveClientID(), ResetClientSlot(), SetClientID(), Size(), Touch(), and XrdProofdClient().
|
private |
Definition at line 103 of file XrdProofdClient.h.
Referenced by EraseServer(), GetClientID(), GetFreeServObj(), GetProtocol(), GetServer(), GetServObj(), GetTopServers(), IsValid(), Match(), ReserveClientID(), ResetClientSlot(), SetClientID(), SetValid(), and XrdProofdClient().
|
private |
Definition at line 100 of file XrdProofdClient.h.
Referenced by Broadcast(), EraseServer(), GetClientID(), GetFreeServObj(), GetProtocol(), GetServer(), GetServObj(), GetTopServers(), Mutex(), ReserveClientID(), ResetClientSlot(), ResetSessions(), SetClientID(), and Touch().
|
private |
Definition at line 114 of file XrdProofdClient.h.
Referenced by EraseServer(), GetFreeServObj(), GetServer(), GetServObj(), GetTopServers(), ResetSessions(), SkipSessionsCheck(), TerminateSessions(), and XrdProofdClient().
|
private |
Definition at line 105 of file XrdProofdClient.h.
Referenced by GetClientID(), and XrdProofdClient().
|
private |
Definition at line 108 of file XrdProofdClient.h.
Referenced by ROOT(), SetROOT(), and XrdProofdClient().
|
private |
Definition at line 110 of file XrdProofdClient.h.
Referenced by Sandbox(), TerminateSessions(), TrimSessionDirs(), and XrdProofdClient().
|
private |
Definition at line 107 of file XrdProofdClient.h.
Referenced by Group(), SetGroup(), UI(), User(), and XrdProofdClient().