ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
XrdProofWorker Class Reference

Definition at line 35 of file XrdProofWorker.h.

Public Member Functions

 XrdProofWorker (const char *str=0)
 Constructor from a config file-like string. More...
 
 XrdProofWorker (const XrdProofWorker &)
 Copy constructor. More...
 
virtual ~XrdProofWorker ()
 Destructor. More...
 
void Reset (const char *str)
 Set content from a config file-like string. More...
 
const char * Export (const char *ord=0)
 Export current content in a form understood by parsing algorithms inside the PROOF session, i.e. More...
 
bool Matches (const char *host)
 Check compatibility of host with this instance. More...
 
bool Matches (XrdProofWorker *wrk)
 Set content from a config file-like string. More...
 
int GetNActiveSessions ()
 Calculate the number of workers existing on this node which are currently running. More...
 
int Active () const
 
void AddProofServ (XrdProofdProofServ *xps)
 
void RemoveProofServ (XrdProofdProofServ *xps)
 
void MergeProofServs (const XrdProofWorker &other)
 Merge session objects from the other worker object in order to merge all the objects in only one. More...
 

Static Public Member Functions

static void Sort (std::list< XrdProofWorker * > *lst, bool(*f)(XrdProofWorker *&lhs, XrdProofWorker *&rhs))
 Sort ascendingly the list according to the comparing algorithm defined by 'f'; 'f' should return 'true' if 'rhs' > 'lhs'. More...
 

Public Attributes

std::list< XrdProofdProofServ * > fProofServs
 
XrdOucString fExport
 
char fType
 
XrdOucString fUser
 
XrdOucString fHost
 
int fPort
 
int fPerfIdx
 
XrdOucString fImage
 
XrdOucString fWorkDir
 
XrdOucString fMsd
 
XrdOucString fId
 
int fNwrks
 
XrdOucString fOrd
 
bool fActive
 

Private Attributes

XrdSysRecMutexfMutex
 

#include <XrdProofWorker.h>

Constructor & Destructor Documentation

XrdProofWorker::XrdProofWorker ( const char *  str = 0)

Constructor from a config file-like string.

Definition at line 39 of file XrdProofWorker.cxx.

XrdProofWorker::XrdProofWorker ( const XrdProofWorker w)

Copy constructor.

Definition at line 62 of file XrdProofWorker.cxx.

XrdProofWorker::~XrdProofWorker ( )
virtual

Destructor.

Definition at line 54 of file XrdProofWorker.cxx.

Member Function Documentation

int XrdProofWorker::Active ( ) const
inline

Definition at line 54 of file XrdProofWorker.h.

Referenced by DumpWorkerCounters(), and ExportWorkerDescription().

void XrdProofWorker::AddProofServ ( XrdProofdProofServ xps)
inline

Definition at line 58 of file XrdProofWorker.h.

Referenced by XrdProofdManager::GetWorkers().

const char * XrdProofWorker::Export ( const char *  ord = 0)

Export current content in a form understood by parsing algorithms inside the PROOF session, i.e.

<type>|<user>|<port>|<ord>|-|<perfidx>||<workdir>|<msd>

Definition at line 203 of file XrdProofWorker.cxx.

Referenced by ExportWorkerDescription(), and XrdProofdManager::GetWorkers().

int XrdProofWorker::GetNActiveSessions ( )

Calculate the number of workers existing on this node which are currently running.

TODO: optimally, one could contact the packetizer and count the opened files.

Definition at line 280 of file XrdProofWorker.cxx.

Referenced by CountEffectiveSessions(), XrdProofSched::GetWorkers(), and XpdWrkComp().

bool XrdProofWorker::Matches ( const char *  host)

Check compatibility of host with this instance.

return 1 if compatible.

Definition at line 169 of file XrdProofWorker.cxx.

Referenced by XrdProofdNetMgr::DoDirectiveWorker(), and XrdProofdNetMgr::ReadPROOFcfg().

bool XrdProofWorker::Matches ( XrdProofWorker wrk)

Set content from a config file-like string.

Definition at line 177 of file XrdProofWorker.cxx.

void XrdProofWorker::MergeProofServs ( const XrdProofWorker other)

Merge session objects from the other worker object in order to merge all the objects in only one.

This was added to support hybrid satatically and dinamically Bonjour workers discovery.

Definition at line 299 of file XrdProofWorker.cxx.

void XrdProofWorker::RemoveProofServ ( XrdProofdProofServ xps)
inline

Definition at line 62 of file XrdProofWorker.h.

Referenced by DecreaseWorkerCounters(), and XrdProofdProofServ::RemoveWorker().

void XrdProofWorker::Reset ( const char *  str)

Set content from a config file-like string.

Definition at line 82 of file XrdProofWorker.cxx.

Referenced by XrdProofdNetMgr::DoDirectiveWorker(), XrdProofdNetMgr::ReadPROOFcfg(), and XrdProofWorker().

void XrdProofWorker::Sort ( std::list< XrdProofWorker * > *  lst,
bool(*)(XrdProofWorker *&lhs, XrdProofWorker *&rhs)  f 
)
static

Sort ascendingly the list according to the comparing algorithm defined by 'f'; 'f' should return 'true' if 'rhs' > 'lhs'.

This is implemented because on Solaris where std::list::sort() does not support an alternative comparison algorithm.

Definition at line 314 of file XrdProofWorker.cxx.

Referenced by XrdProofSched::GetWorkers().

Member Data Documentation

bool XrdProofWorker::fActive

Definition at line 87 of file XrdProofWorker.h.

Referenced by XrdProofWorker().

XrdOucString XrdProofWorker::fExport

Definition at line 73 of file XrdProofWorker.h.

Referenced by Export(), Reset(), and XrdProofWorker().

XrdOucString XrdProofWorker::fHost
XrdOucString XrdProofWorker::fId

Definition at line 82 of file XrdProofWorker.h.

Referenced by Reset(), and XrdProofWorker().

XrdOucString XrdProofWorker::fImage

Definition at line 79 of file XrdProofWorker.h.

Referenced by Export(), Reset(), and XrdProofWorker().

XrdOucString XrdProofWorker::fMsd

Definition at line 81 of file XrdProofWorker.h.

Referenced by Export(), Reset(), and XrdProofWorker().

XrdSysRecMutex* XrdProofWorker::fMutex
private
int XrdProofWorker::fNwrks

Definition at line 83 of file XrdProofWorker.h.

Referenced by Export(), XrdProofdManager::GetWorkers(), Reset(), and XrdProofWorker().

XrdOucString XrdProofWorker::fOrd

Definition at line 85 of file XrdProofWorker.h.

Referenced by Export(), XrdProofdManager::GetWorkers(), Reset(), and XrdProofWorker().

int XrdProofWorker::fPerfIdx

Definition at line 78 of file XrdProofWorker.h.

Referenced by Export(), Reset(), and XrdProofWorker().

int XrdProofWorker::fPort
std::list<XrdProofdProofServ *> XrdProofWorker::fProofServs
char XrdProofWorker::fType
XrdOucString XrdProofWorker::fUser
XrdOucString XrdProofWorker::fWorkDir

Definition at line 80 of file XrdProofWorker.h.

Referenced by Export(), Reset(), and XrdProofWorker().

Collaboration diagram for XrdProofWorker:
[legend]

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