ROOT  6.06/09
Reference Guide
Public Member Functions | Private Attributes | List of all members
XrdProofdClient Class Reference

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...
 
XrdSysRecMutexMutex () const
 
XrdROOTROOT () const
 
XrdProofdSandboxSandbox () const
 
XrdProofUI UI () const
 
XrdProofdProofServGetServer (int psid)
 Get from the vector server instance with ID psid. More...
 
XrdProofdProofServGetServer (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...
 
XrdProofdProtocolGetProtocol (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...
 
XrdProofdProofServGetFreeServObj ()
 Get next free server ID. More...
 
XrdProofdProofServGetServObj (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
 
XrdROOTfROOT
 
XrdProofdSandbox fSandbox
 
XrdOucString fAdminPath
 
std::vector< XrdProofdProofServ * > fProofServs
 
std::vector< XrdClientID * > fClients
 

#include <XrdProofdClient.h>

+ Collaboration diagram for XrdProofdClient:

Constructor & Destructor Documentation

XrdProofdClient::XrdProofdClient ( XrdProofUI  ui,
bool  master,
bool  changeown,
XrdSysError edest,
const char *  tmp,
int  rtime 
)

Constructor.

Definition at line 37 of file XrdProofdClient.cxx.

XrdProofdClient::~XrdProofdClient ( )
virtual

Destructor.

Definition at line 71 of file XrdProofdClient.cxx.

Member Function Documentation

const char* XrdProofdClient::AdminPath ( ) const
inline
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)
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.

const char* XrdProofdClient::Group ( ) const
inline
bool XrdProofdClient::IsValid ( ) const
inline
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().

XrdSysRecMutex* XrdProofdClient::Mutex ( ) const
inline
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().

XrdROOT* XrdProofdClient::ROOT ( ) const
inline
XrdProofdSandbox* XrdProofdClient::Sandbox ( ) const
inline
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().

void XrdProofdClient::SetGroup ( const char *  g)
inline
void XrdProofdClient::SetROOT ( XrdROOT r)
inline
void XrdProofdClient::SetValid ( bool  valid = 1)
inline

Definition at line 88 of file XrdProofdClient.h.

int XrdProofdClient::Size ( ) const
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().

int XrdProofdClient::TrimSessionDirs ( )
inline

Definition at line 94 of file XrdProofdClient.h.

Referenced by XrdProofdClientMgr::GetClient().

XrdProofUI XrdProofdClient::UI ( ) const
inline
const char* XrdProofdClient::User ( ) const
inline
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().

Member Data Documentation

XrdOucString XrdProofdClient::fAdminPath
private

Definition at line 112 of file XrdProofdClient.h.

Referenced by AdminPath(), and XrdProofdClient().

bool XrdProofdClient::fAskedToTouch
private

Definition at line 104 of file XrdProofdClient.h.

Referenced by ResetSessions(), Touch(), and XrdProofdClient().

bool XrdProofdClient::fChangeOwn
private

Definition at line 102 of file XrdProofdClient.h.

Referenced by XrdProofdClient().

std::vector<XrdClientID *> XrdProofdClient::fClients
private
bool XrdProofdClient::fIsValid
private
XrdSysRecMutex XrdProofdClient::fMutex
private
std::vector<XrdProofdProofServ *> XrdProofdClient::fProofServs
private
int XrdProofdClient::fReconnectTimeOut
private

Definition at line 105 of file XrdProofdClient.h.

Referenced by GetClientID(), and XrdProofdClient().

XrdROOT* XrdProofdClient::fROOT
private

Definition at line 108 of file XrdProofdClient.h.

Referenced by ROOT(), SetROOT(), and XrdProofdClient().

XrdProofdSandbox XrdProofdClient::fSandbox
private

Definition at line 110 of file XrdProofdClient.h.

Referenced by Sandbox(), TerminateSessions(), TrimSessionDirs(), and XrdProofdClient().

XrdProofUI XrdProofdClient::fUI
private

Definition at line 107 of file XrdProofdClient.h.

Referenced by Group(), SetGroup(), UI(), User(), and XrdProofdClient().


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