Logo ROOT   6.07/09
Reference Guide
List of all members | 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...
 
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...
 
XrdProofQueryCurrentQuery ()
 
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...
 
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
 
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
 
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...
 
XrdProofdResponseResponse () const
 
int Resume ()
 Send a resume message to the this session. More...
 
XrdROOTROOT () 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
 
XrdSrvBufferStartMsg () 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
 
XrdSysRecMutexfMutex
 
int fNClients
 
XrdOucString fOrdinal
 
XrdClientIDfParent
 
XrdSysSemWaitfPingSem
 
int fPLiteNWrks
 
XrdProofdProtocolfProtocol
 
char fProtVer
 
std::list< XrdProofQuery * > fQueries
 
XrdProofdResponsefResponse
 
XrdROOTfROOT
 
time_t fSetIdleTime
 
bool fSkipCheck
 
int fSrvPID
 
int fSrvType
 
XrdSrvBufferfStartMsg
 
int fStatus
 
XrdOucString fTag
 
XrdNet * fUNIXSock
 
XrdOucString fUNIXSockPath
 
XrdOucString fUserEnvs
 
XrdOucHash< XrdProofWorkerfWorkers
 

#include <XrdProofdProofServ.h>

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.

const char* XrdProofdProofServ::AdminPath ( ) const
inline

Definition at line 118 of file XrdProofdProofServ.h.

const char* XrdProofdProofServ::Alias ( ) const
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.

void XrdProofdProofServ::ClearWorkers ( )
private

Decrease worker counters and clean-up the list.

Definition at line 129 of file XrdProofdProofServ.cxx.

const char* XrdProofdProofServ::Client ( ) const
inline

Definition at line 122 of file XrdProofdProofServ.h.

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.

XrdProofQuery* XrdProofdProofServ::CurrentQuery ( )
inline

Definition at line 125 of file XrdProofdProofServ.h.

void XrdProofdProofServ::DeletePingSem ( )
inlineprivate

Definition at line 257 of file XrdProofdProofServ.h.

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

int XrdProofdProofServ::Enqueue ( XrdProofQuery q)
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.

const char* XrdProofdProofServ::Fileout ( ) const
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.

const char* XrdProofdProofServ::Group ( ) const
inline

Definition at line 139 of file XrdProofdProofServ.h.

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

bool XrdProofdProofServ::IsPLite ( ) const
inline

Definition at line 142 of file XrdProofdProofServ.h.

bool XrdProofdProofServ::IsShutdown ( ) const
inline

Definition at line 143 of file XrdProofdProofServ.h.

bool XrdProofdProofServ::IsValid ( ) const
inline

Definition at line 144 of file XrdProofdProofServ.h.

bool XrdProofdProofServ::Match ( short int  id) const
inline

Definition at line 145 of file XrdProofdProofServ.h.

const char* XrdProofdProofServ::Ordinal ( ) const
inline

Definition at line 146 of file XrdProofdProofServ.h.

XrdClientID* XrdProofdProofServ::Parent ( ) const
inline

Definition at line 147 of file XrdProofdProofServ.h.

void XrdProofdProofServ::PingSem ( ) const
inline

Definition at line 148 of file XrdProofdProofServ.h.

int XrdProofdProofServ::PLiteNWrks ( ) const
inline

Definition at line 149 of file XrdProofdProofServ.h.

XrdProofdProtocol* XrdProofdProofServ::Protocol ( ) const
inline

Definition at line 150 of file XrdProofdProofServ.h.

std::list<XrdProofQuery *>* XrdProofdProofServ::Queries ( ) const
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.

void XrdProofdProofServ::Reset ( void  )

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.

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

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

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

Definition at line 165 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetClient ( const char *  c)
inline

Definition at line 166 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetConnection ( XrdProofdResponse r)
inline

Definition at line 167 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetFileout ( const char *  f)
inline

Definition at line 169 of file XrdProofdProofServ.h.

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

Definition at line 170 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetID ( short int  id)
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.

void XrdProofdProofServ::SetOrdinal ( const char *  o)
inline

Definition at line 173 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetParent ( XrdClientID cid)
inline

Definition at line 174 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetPLiteNWrks ( int  n)
inline

Definition at line 175 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetProtocol ( XrdProofdProtocol p)
inline

Definition at line 176 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetProtVer ( int  pv)
inline

Definition at line 177 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetROOT ( XrdROOT r)
inline

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.

void XrdProofdProofServ::SetShutdown ( )
inline

Definition at line 180 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetSkipCheck ( )
inline

Definition at line 181 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetSrvPID ( int  pid)
inline

Definition at line 182 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetSrvType ( int  id)
inline

Definition at line 183 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetStartMsg ( XrdSrvBuffer sm)
inline

Definition at line 184 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetStatus ( int  st)
inline

Definition at line 185 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetTag ( const char *  t)
inline

Definition at line 186 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetUNIXSockPath ( const char *  s)
inline

Definition at line 187 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetUserEnvs ( const char *  t)
inline

Definition at line 188 of file XrdProofdProofServ.h.

void XrdProofdProofServ::SetValid ( bool  valid = 1)
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.

int XrdProofdProofServ::SrvPID ( ) const
inline

Definition at line 191 of file XrdProofdProofServ.h.

int XrdProofdProofServ::SrvType ( ) const
inline

Definition at line 192 of file XrdProofdProofServ.h.

XrdSrvBuffer* XrdProofdProofServ::StartMsg ( ) const
inline

Definition at line 193 of file XrdProofdProofServ.h.

int XrdProofdProofServ::Status ( ) const
inline

Definition at line 194 of file XrdProofdProofServ.h.

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

XrdNet* XrdProofdProofServ::UNIXSock ( ) const
inline

Definition at line 205 of file XrdProofdProofServ.h.

const char* XrdProofdProofServ::UNIXSockPath ( ) const
inline

Definition at line 206 of file XrdProofdProofServ.h.

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

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

Definition at line 199 of file XrdProofdProofServ.h.

Member Data Documentation

XrdOucString XrdProofdProofServ::fAdminPath
private

Definition at line 247 of file XrdProofdProofServ.h.

XrdOucString XrdProofdProofServ::fAlias
private

Definition at line 242 of file XrdProofdProofServ.h.

XrdOucString XrdProofdProofServ::fClient
private

Definition at line 243 of file XrdProofdProofServ.h.

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

Definition at line 216 of file XrdProofdProofServ.h.

time_t XrdProofdProofServ::fDisconnectTime
private

Definition at line 223 of file XrdProofdProofServ.h.

XrdOucString XrdProofdProofServ::fFileout
private

Definition at line 231 of file XrdProofdProofServ.h.

XrdOucString XrdProofdProofServ::fGroup
private

Definition at line 251 of file XrdProofdProofServ.h.

short int XrdProofdProofServ::fID
private

Definition at line 229 of file XrdProofdProofServ.h.

bool XrdProofdProofServ::fIsShutdown
private

Definition at line 238 of file XrdProofdProofServ.h.

bool XrdProofdProofServ::fIsValid
private

Definition at line 239 of file XrdProofdProofServ.h.

XrdSysRecMutex* XrdProofdProofServ::fMutex
private

Definition at line 210 of file XrdProofdProofServ.h.

int XrdProofdProofServ::fNClients
private

Definition at line 215 of file XrdProofdProofServ.h.

XrdOucString XrdProofdProofServ::fOrdinal
private

Definition at line 245 of file XrdProofdProofServ.h.

XrdClientID* XrdProofdProofServ::fParent
private

Definition at line 214 of file XrdProofdProofServ.h.

XrdSysSemWait* XrdProofdProofServ::fPingSem
private

Definition at line 219 of file XrdProofdProofServ.h.

int XrdProofdProofServ::fPLiteNWrks
private

Definition at line 233 of file XrdProofdProofServ.h.

XrdProofdProtocol* XrdProofdProofServ::fProtocol
private

Definition at line 211 of file XrdProofdProofServ.h.

char XrdProofdProofServ::fProtVer
private

Definition at line 230 of file XrdProofdProofServ.h.

std::list<XrdProofQuery *> XrdProofdProofServ::fQueries
private

Definition at line 259 of file XrdProofdProofServ.h.

XrdProofdResponse* XrdProofdProofServ::fResponse
private

Definition at line 212 of file XrdProofdProofServ.h.

XrdROOT* XrdProofdProofServ::fROOT
private

Definition at line 249 of file XrdProofdProofServ.h.

time_t XrdProofdProofServ::fSetIdleTime
private

Definition at line 224 of file XrdProofdProofServ.h.

bool XrdProofdProofServ::fSkipCheck
private

Definition at line 240 of file XrdProofdProofServ.h.

int XrdProofdProofServ::fSrvPID
private

Definition at line 227 of file XrdProofdProofServ.h.

int XrdProofdProofServ::fSrvType
private

Definition at line 228 of file XrdProofdProofServ.h.

XrdSrvBuffer* XrdProofdProofServ::fStartMsg
private

Definition at line 221 of file XrdProofdProofServ.h.

int XrdProofdProofServ::fStatus
private

Definition at line 226 of file XrdProofdProofServ.h.

XrdOucString XrdProofdProofServ::fTag
private

Definition at line 244 of file XrdProofdProofServ.h.

XrdNet* XrdProofdProofServ::fUNIXSock
private

Definition at line 235 of file XrdProofdProofServ.h.

XrdOucString XrdProofdProofServ::fUNIXSockPath
private

Definition at line 236 of file XrdProofdProofServ.h.

XrdOucString XrdProofdProofServ::fUserEnvs
private

Definition at line 246 of file XrdProofdProofServ.h.

XrdOucHash<XrdProofWorker> XrdProofdProofServ::fWorkers
private

Definition at line 217 of file XrdProofdProofServ.h.


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