ROOT  6.06/08
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::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::~XrdProofdClient ( )
virtual

Destructor.

Definition at line 71 of file XrdProofdClient.cxx.

Member Function Documentation

§ AdminPath()

const char* XrdProofdClient::AdminPath ( ) const
inline

§ Broadcast()

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(), XrdProofdClientMgr::TerminateSessions(), and UI().

§ EraseServer()

void XrdProofdClient::EraseServer ( int  psid)

Erase server with id psid from the list.

Definition at line 332 of file XrdProofdClient.cxx.

Referenced by UI().

§ ExportSessions()

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(), and UI().

§ GetClientID()

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(), and UI().

§ GetFreeServObj()

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(), and UI().

§ GetProtocol()

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(), and UI().

§ GetServer() [1/2]

XrdProofdProofServ * XrdProofdClient::GetServer ( int  psid)

§ GetServer() [2/2]

XrdProofdProofServ * XrdProofdClient::GetServer ( XrdProofdProtocol p)

Get server instance connected via 'p'.

Definition at line 296 of file XrdProofdClient.cxx.

§ GetServObj()

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(), and UI().

§ GetTopServers()

int XrdProofdClient::GetTopServers ( )

Return the number of valid proofserv topmaster sessions in the list.

Definition at line 356 of file XrdProofdClient.cxx.

Referenced by UI().

§ Group()

const char* XrdProofdClient::Group ( ) const
inline

§ IsValid()

bool XrdProofdClient::IsValid ( ) const
inline

§ Match()

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(), and IsValid().

§ Mutex()

XrdSysRecMutex* XrdProofdClient::Mutex ( ) const
inline

§ ReserveClientID()

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(), and UI().

§ ResetClientSlot()

int XrdProofdClient::ResetClientSlot ( int  ic)

Reset slot at 'ic'.

Definition at line 380 of file XrdProofdClient.cxx.

Referenced by XrdProofdProtocol::Recycle(), and UI().

§ ResetSessions()

void XrdProofdClient::ResetSessions ( )

Reset this instance.

Definition at line 693 of file XrdProofdClient.cxx.

Referenced by XrdProofdClientMgr::TerminateSessions(), and UI().

§ ROOT()

XrdROOT* XrdProofdClient::ROOT ( ) const
inline

§ Sandbox()

XrdProofdSandbox* XrdProofdClient::Sandbox ( ) const
inline

§ SetClientID()

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(), and UI().

§ SetGroup()

void XrdProofdClient::SetGroup ( const char *  g)
inline

§ SetROOT()

void XrdProofdClient::SetROOT ( XrdROOT r)
inline

§ SetValid()

void XrdProofdClient::SetValid ( bool  valid = 1)
inline

Definition at line 88 of file XrdProofdClient.h.

§ Size()

int XrdProofdClient::Size ( ) const
inline

Definition at line 90 of file XrdProofdClient.h.

Referenced by XrdProofdClientMgr::MapClient().

§ SkipSessionsCheck()

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(), ExportSessions(), and UI().

§ TerminateSessions()

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(), and UI().

§ Touch()

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(), XrdProofdProtocol::Process2(), and Size().

§ TrimSessionDirs()

int XrdProofdClient::TrimSessionDirs ( )
inline

Definition at line 94 of file XrdProofdClient.h.

Referenced by XrdProofdClientMgr::GetClient().

§ UI()

XrdProofUI XrdProofdClient::UI ( ) const
inline

§ User()

const char* XrdProofdClient::User ( ) const
inline

§ VerifySession()

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(), and UI().

Member Data Documentation

§ fAdminPath

XrdOucString XrdProofdClient::fAdminPath
private

Definition at line 112 of file XrdProofdClient.h.

Referenced by AdminPath(), and XrdProofdClient().

§ fAskedToTouch

bool XrdProofdClient::fAskedToTouch
private

Definition at line 104 of file XrdProofdClient.h.

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

§ fChangeOwn

bool XrdProofdClient::fChangeOwn
private

Definition at line 102 of file XrdProofdClient.h.

Referenced by XrdProofdClient().

§ fClients

std::vector<XrdClientID *> XrdProofdClient::fClients
private

§ fIsValid

bool XrdProofdClient::fIsValid
private

§ fMutex

XrdSysRecMutex XrdProofdClient::fMutex
private

§ fProofServs

std::vector<XrdProofdProofServ *> XrdProofdClient::fProofServs
private

§ fReconnectTimeOut

int XrdProofdClient::fReconnectTimeOut
private

Definition at line 105 of file XrdProofdClient.h.

Referenced by GetClientID(), and XrdProofdClient().

§ fROOT

XrdROOT* XrdProofdClient::fROOT
private

Definition at line 108 of file XrdProofdClient.h.

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

§ fSandbox

XrdProofdSandbox XrdProofdClient::fSandbox
private

Definition at line 110 of file XrdProofdClient.h.

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

§ fUI

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: