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

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...
 
const char * Client () const
 
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...
 
XrdProofQueryCurrentQuery ()
 
void DeleteStartMsg ()
 
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...
 
XrdClientIDGetClientID (int cid)
 Get instance corresponding to cid. More...
 
int GetNClients (bool check)
 Get the number of connected clients. More...
 
XrdProofQueryGetQuery (const char *tag)
 Get query with tag form the list of queries. More...
 
const char * Group () const
 
int IdleTime ()
 Return the time (in secs) the session has been idle. More...
 
short int ID () const
 
bool IsPLite () const
 
bool IsShutdown () const
 
bool IsValid () const
 
bool Match (short int id) const
 
const char * Ordinal () const
 
XrdClientIDParent () const
 
void PingSem () const
 
int PLiteNWrks () const
 
XrdProofdProtocolProtocol () 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...
 
int Resume ()
 Send a resume message to the this session. More...
 
XrdROOTROOT () const
 
XrdProofdResponseResponse () const
 
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...
 
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 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 SetIdle ()
 Set status to idle and update the related time stamp. More...
 
void SetID (short int id)
 
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
 
XrdSrvBufferStartMsg () const
 
int Status () const
 
const char * Tag () const
 
int TerminateProofServ (bool changeown)
 Terminate the associated process. More...
 
const char * UserEnvs () const
 
int VerifyProofServ (bool fw)
 Check if the associated proofserv process is alive. More...
 
XrdOucHash< XrdProofWorker > * Workers () const
 
int CreateUNIXSock (XrdSysError *edest)
 Create UNIX socket for internal connections. More...
 
void DeleteUNIXSock ()
 Delete the current UNIX socket. More...
 
XrdNet * UNIXSock () const
 
const char * UNIXSockPath () const
 

Private Member Functions

void ClearWorkers ()
 Decrease worker counters and clean-up the list. More...
 
void CreatePingSem ()
 
void DeletePingSem ()
 

Private Attributes

XrdSysRecMutexfMutex
 
XrdProofdProtocolfProtocol
 
XrdProofdResponsefResponse
 
XrdClientIDfParent
 
int fNClients
 
std::vector< XrdClientID * > fClients
 
XrdOucHash< XrdProofWorkerfWorkers
 
XrdSysSemWaitfPingSem
 
XrdSrvBufferfStartMsg
 
time_t fDisconnectTime
 
time_t fSetIdleTime
 
int fStatus
 
int fSrvPID
 
int fSrvType
 
short int fID
 
char fProtVer
 
XrdOucString fFileout
 
int fPLiteNWrks
 
XrdNet * fUNIXSock
 
XrdOucString fUNIXSockPath
 
bool fIsShutdown
 
bool fIsValid
 
bool fSkipCheck
 
XrdOucString fAlias
 
XrdOucString fClient
 
XrdOucString fTag
 
XrdOucString fOrdinal
 
XrdOucString fUserEnvs
 
XrdOucString fAdminPath
 
XrdROOTfROOT
 
XrdOucString fGroup
 
std::list< XrdProofQuery * > fQueries
 

#include <XrdProofdProofServ.h>

+ Collaboration diagram for XrdProofdProofServ:

Constructor & Destructor Documentation

XrdProofdProofServ::XrdProofdProofServ ( )

Constructor.

Definition at line 27 of file XrdProofdProofServ.cxx.

XrdProofdProofServ::~XrdProofdProofServ ( )

Destructor.

Definition at line 66 of file XrdProofdProofServ.cxx.

Member Function Documentation

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.

Referenced by XrdProofdManager::GetWorkers().

const char* XrdProofdProofServ::AdminPath ( ) const
inline
const char* XrdProofdProofServ::Alias ( ) const
inline

Definition at line 119 of file XrdProofdProofServ.h.

Referenced by XrdProofSessionInfo::XrdProofSessionInfo().

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.

Referenced by Reset().

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.

Referenced by BroadcastPriority().

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.

Referenced by XrdProofdProofServMgr::CheckActiveSessions().

void XrdProofdProofServ::ClearWorkers ( )
private

Decrease worker counters and clean-up the list.

Definition at line 129 of file XrdProofdProofServ.cxx.

Referenced by Reset(), and ~XrdProofdProofServ().

const char* XrdProofdProofServ::Client ( ) const
inline
void XrdProofdProofServ::CreatePingSem ( )
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.

Referenced by XrdProofdProofServMgr::Create(), XrdProofdProofServMgr::CreateSockPath(), and XrdProofdProofServMgr::ResolveSession().

XrdProofQuery* XrdProofdProofServ::CurrentQuery ( )
inline

Definition at line 125 of file XrdProofdProofServ.h.

Referenced by XrdProofSched::GetWorkers(), and XrdProofSched::Reschedule().

void XrdProofdProofServ::DeletePingSem ( )
inlineprivate

Definition at line 257 of file XrdProofdProofServ.h.

void XrdProofdProofServ::DeleteStartMsg ( )
inline

Definition at line 126 of file XrdProofdProofServ.h.

Referenced by XrdProofdProtocol::SendMsg().

void XrdProofdProofServ::DeleteUNIXSock ( )

Delete the current UNIX socket.

Definition at line 255 of file XrdProofdProofServ.cxx.

Referenced by XrdProofdProofServMgr::Create(), and Reset().

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.

Referenced by XrdProofSched::GetWorkers().

int XrdProofdProofServ::Enqueue ( XrdProofQuery q)
inline

Definition at line 130 of file XrdProofdProofServ.h.

Referenced by XrdProofSched::Enqueue().

void XrdProofdProofServ::ExportBuf ( XrdOucString &  buf)

Fill buf with relevant info about this session.

Definition at line 668 of file XrdProofdProofServ.cxx.

Referenced by XrdProofdClient::ExportSessions().

void XrdProofdProofServ::ExportWorkers ( XrdOucString &  wrks)

Export the assigned workers in the format understood by proofserv.

Definition at line 873 of file XrdProofdProofServ.cxx.

Referenced by XrdProofdManager::GetWorkers().

const char* XrdProofdProofServ::Fileout ( ) const
inline
int XrdProofdProofServ::FreeClientID ( int  pid)

Free instance corresponding to protocol connecting process 'pid'.

Definition at line 331 of file XrdProofdProofServ.cxx.

Referenced by XrdProofdProofServMgr::Detach(), and FreeClientID().

XrdClientID * XrdProofdProofServ::GetClientID ( int  cid)

Get instance corresponding to cid.

Definition at line 277 of file XrdProofdProofServ.cxx.

Referenced by XrdProofdProofServMgr::Attach(), and XrdProofdProofServMgr::PrepareProofServ().

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.

Referenced by XrdProofdProofServMgr::Create().

XrdProofQuery * XrdProofdProofServ::GetQuery ( const char *  tag)

Get query with tag form the list of queries.

Definition at line 905 of file XrdProofdProofServ.cxx.

Referenced by XrdProofSched::GetWorkers().

const char* XrdProofdProofServ::Group ( ) const
inline

Definition at line 139 of file XrdProofdProofServ.h.

Referenced by BroadcastPriority(), and XrdProofSched::GetNumWorkers().

short int XrdProofdProofServ::ID ( ) const
inline
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.

bool XrdProofdProofServ::IsPLite ( ) const
inline
bool XrdProofdProofServ::IsShutdown ( ) const
inline

Definition at line 143 of file XrdProofdProofServ.h.

bool XrdProofdProofServ::IsValid ( ) const
inline
bool XrdProofdProofServ::Match ( short int  id) const
inline
const char* XrdProofdProofServ::Ordinal ( ) const
inline
XrdClientID* XrdProofdProofServ::Parent ( ) const
inline
void XrdProofdProofServ::PingSem ( ) const
inline

Definition at line 148 of file XrdProofdProofServ.h.

int XrdProofdProofServ::PLiteNWrks ( ) const
inline
XrdProofdProtocol* XrdProofdProofServ::Protocol ( ) const
inline

Definition at line 150 of file XrdProofdProofServ.h.

Referenced by XrdProofdProofServMgr::Recover().

std::list<XrdProofQuery *>* XrdProofdProofServ::Queries ( ) const
inline

Definition at line 151 of file XrdProofdProofServ.h.

Referenced by XrdProofSched::Reschedule().

void XrdProofdProofServ::RemoveQuery ( const char *  tag)

remove query with tag form the list of queries

Definition at line 927 of file XrdProofdProofServ.cxx.

Referenced by XrdProofSched::GetWorkers().

void XrdProofdProofServ::RemoveWorker ( const char *  o)

Release worker assigned to this session with label 'o'.

Definition at line 153 of file XrdProofdProofServ.cxx.

void XrdProofdProofServ::Reset ( void  )
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.

XrdProofdResponse* XrdProofdProofServ::Response ( ) const
inline
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.

Referenced by XrdProofSched::Reschedule().

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

Referenced by XrdProofdProtocol::SendData().

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.

Referenced by XrdProofdProtocol::SendDataN().

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.

Referenced by XrdProofdProofServMgr::Create(), XrdProofdProofServMgr::CreateAdminPath(), and XrdProofSessionInfo::FillProofServ().

void XrdProofdProofServ::SetAlias ( const char *  a)
inline

Definition at line 165 of file XrdProofdProofServ.h.

Referenced by XrdProofSessionInfo::FillProofServ().

void XrdProofdProofServ::SetClient ( const char *  c)
inline
void XrdProofdProofServ::SetConnection ( XrdProofdResponse r)
inline

Definition at line 167 of file XrdProofdProofServ.h.

Referenced by FreeClientID(), and XrdProofdClientMgr::MapClient().

void XrdProofdProofServ::SetFileout ( const char *  f)
inline
void XrdProofdProofServ::SetGroup ( const char *  g)
inline
void XrdProofdProofServ::SetID ( short int  id)
inline
void XrdProofdProofServ::SetIdle ( )

Set status to idle and update the related time stamp.

Definition at line 429 of file XrdProofdProofServ.cxx.

void XrdProofdProofServ::SetOrdinal ( const char *  o)
inline
void XrdProofdProofServ::SetParent ( XrdClientID cid)
inline
void XrdProofdProofServ::SetPLiteNWrks ( int  n)
inline
void XrdProofdProofServ::SetProtocol ( XrdProofdProtocol p)
inline

Definition at line 176 of file XrdProofdProofServ.h.

Referenced by FreeClientID(), and XrdProofdProofServMgr::SetupProtocol().

void XrdProofdProofServ::SetProtVer ( int  pv)
inline

Definition at line 177 of file XrdProofdProofServ.h.

Referenced by XrdProofdClientMgr::MapClient().

void XrdProofdProofServ::SetROOT ( XrdROOT r)
inline
void XrdProofdProofServ::SetRunning ( )

Set status to running and reset the related time stamp.

Definition at line 441 of file XrdProofdProofServ.cxx.

void XrdProofdProofServ::SetShutdown ( )
inline

Definition at line 180 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetSkipCheck ( )
inline

Definition at line 181 of file XrdProofdProofServ.h.

Referenced by XrdProofdClient::SkipSessionsCheck().

void XrdProofdProofServ::SetSrvPID ( int  pid)
inline
void XrdProofdProofServ::SetSrvType ( int  id)
inline
void XrdProofdProofServ::SetStartMsg ( XrdSrvBuffer sm)
inline

Definition at line 184 of file XrdProofdProofServ.h.

Referenced by XrdProofdProtocol::SendMsg().

void XrdProofdProofServ::SetStatus ( int  st)
inline
void XrdProofdProofServ::SetTag ( const char *  t)
inline
void XrdProofdProofServ::SetUNIXSockPath ( const char *  s)
inline
void XrdProofdProofServ::SetUserEnvs ( const char *  t)
inline
void XrdProofdProofServ::SetValid ( bool  valid = 1)
inline
bool XrdProofdProofServ::SkipCheck ( )

Return the value of fSkipCheck and reset it to false.

Definition at line 265 of file XrdProofdProofServ.cxx.

int XrdProofdProofServ::SrvPID ( ) const
inline
int XrdProofdProofServ::SrvType ( ) const
inline
XrdSrvBuffer* XrdProofdProofServ::StartMsg ( ) const
inline

Definition at line 193 of file XrdProofdProofServ.h.

Referenced by XrdProofdProofServMgr::Attach().

int XrdProofdProofServ::Status ( ) const
inline
const char* XrdProofdProofServ::Tag ( ) const
inline
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.

Referenced by XrdProofdClient::TerminateSessions().

XrdNet* XrdProofdProofServ::UNIXSock ( ) const
inline
const char* XrdProofdProofServ::UNIXSockPath ( ) const
inline
const char* XrdProofdProofServ::UserEnvs ( ) const
inline
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.

Referenced by XrdProofdProofServMgr::CheckActiveSessions(), XrdProofdProtocol::Ping(), and XrdProofdClient::VerifySession().

XrdOucHash<XrdProofWorker>* XrdProofdProofServ::Workers ( ) const
inline

Definition at line 199 of file XrdProofdProofServ.h.

Referenced by XrdProofSched::GetWorkers().

Member Data Documentation

XrdOucString XrdProofdProofServ::fAdminPath
private
XrdOucString XrdProofdProofServ::fAlias
private

Definition at line 242 of file XrdProofdProofServ.h.

Referenced by Alias(), ExportBuf(), Reset(), SetAlias(), and XrdProofdProofServ().

XrdOucString XrdProofdProofServ::fClient
private
std::vector<XrdClientID *> XrdProofdProofServ::fClients
private
time_t XrdProofdProofServ::fDisconnectTime
private
XrdOucString XrdProofdProofServ::fFileout
private

Definition at line 231 of file XrdProofdProofServ.h.

Referenced by Fileout(), Reset(), SetFileout(), and XrdProofdProofServ().

XrdOucString XrdProofdProofServ::fGroup
private

Definition at line 251 of file XrdProofdProofServ.h.

Referenced by Group(), Reset(), SetGroup(), and XrdProofdProofServ().

short int XrdProofdProofServ::fID
private

Definition at line 229 of file XrdProofdProofServ.h.

Referenced by ExportBuf(), ID(), Match(), Reset(), SetID(), and XrdProofdProofServ().

bool XrdProofdProofServ::fIsShutdown
private
bool XrdProofdProofServ::fIsValid
private

Definition at line 239 of file XrdProofdProofServ.h.

Referenced by IsValid(), Reset(), SetValid(), and XrdProofdProofServ().

XrdSysRecMutex* XrdProofdProofServ::fMutex
private
int XrdProofdProofServ::fNClients
private
XrdOucString XrdProofdProofServ::fOrdinal
private
XrdClientID* XrdProofdProofServ::fParent
private

Definition at line 214 of file XrdProofdProofServ.h.

Referenced by FreeClientID(), Parent(), Reset(), SetParent(), and XrdProofdProofServ().

XrdSysSemWait* XrdProofdProofServ::fPingSem
private
int XrdProofdProofServ::fPLiteNWrks
private

Definition at line 233 of file XrdProofdProofServ.h.

Referenced by IsPLite(), PLiteNWrks(), Reset(), SetPLiteNWrks(), and XrdProofdProofServ().

XrdProofdProtocol* XrdProofdProofServ::fProtocol
private

Definition at line 211 of file XrdProofdProofServ.h.

Referenced by FreeClientID(), Protocol(), Reset(), SetProtocol(), and XrdProofdProofServ().

char XrdProofdProofServ::fProtVer
private

Definition at line 230 of file XrdProofdProofServ.h.

Referenced by Reset(), SetProtVer(), and XrdProofdProofServ().

std::list<XrdProofQuery *> XrdProofdProofServ::fQueries
private
XrdProofdResponse* XrdProofdProofServ::fResponse
private
XrdROOT* XrdProofdProofServ::fROOT
private

Definition at line 249 of file XrdProofdProofServ.h.

Referenced by Reset(), ROOT(), SetROOT(), and XrdProofdProofServ().

time_t XrdProofdProofServ::fSetIdleTime
private
bool XrdProofdProofServ::fSkipCheck
private
int XrdProofdProofServ::fSrvPID
private
int XrdProofdProofServ::fSrvType
private

Definition at line 228 of file XrdProofdProofServ.h.

Referenced by CheckSession(), Reset(), SetSrvType(), SrvType(), and XrdProofdProofServ().

XrdSrvBuffer* XrdProofdProofServ::fStartMsg
private
int XrdProofdProofServ::fStatus
private
XrdOucString XrdProofdProofServ::fTag
private

Definition at line 244 of file XrdProofdProofServ.h.

Referenced by ExportBuf(), Reset(), SetTag(), Tag(), and XrdProofdProofServ().

XrdNet* XrdProofdProofServ::fUNIXSock
private

Definition at line 235 of file XrdProofdProofServ.h.

Referenced by CreateUNIXSock(), DeleteUNIXSock(), UNIXSock(), and XrdProofdProofServ().

XrdOucString XrdProofdProofServ::fUNIXSockPath
private
XrdOucString XrdProofdProofServ::fUserEnvs
private

Definition at line 246 of file XrdProofdProofServ.h.

Referenced by Reset(), SetUserEnvs(), UserEnvs(), and XrdProofdProofServ().

XrdOucHash<XrdProofWorker> XrdProofdProofServ::fWorkers
private

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