Definition at line 93 of file XrdProofGroup.h.
Public Member Functions | |
XrdProofGroupMgr (const char *fn=0) | |
Constructor. More... | |
~XrdProofGroupMgr () | |
XrdProofGroup * | Apply (int(*f)(const char *, XrdProofGroup *, void *), void *arg) |
Apply function 'f' to the hash table of groups; 'arg' is passed to 'f' in the last argument. More... | |
int | Config (const char *fn) |
(Re-)configure the group info using the file 'fn'. More... | |
XrdOucString | Export (const char *grp) |
Return a string describing the group. More... | |
const char * | GetCfgFile () const |
XrdProofGroup * | GetGroup (const char *grp) |
Returns the instance of for group 'grp. More... | |
XrdProofGroup * | GetUserGroup (const char *usr, const char *grp=0) |
Returns the instance of the first group to which this user belongs; if grp != 0, return the instance corresponding to group 'grp', if existing and the // user belongs to it. More... | |
XrdProofGroup * | Next () |
Returns the instance of next group in the pseudo-iterator functionality. More... | |
int | Num () |
void | Print (const char *grp) |
Return a string describing the group. More... | |
int | ReadPriorities () |
Read update priorities from the file defined at configuration time. More... | |
void | ResetIter () |
int | SetEffectiveFractions (bool optprio) |
Go through the list of active groups (those having at least a non-idle member) and determine the effective resource fraction on the base of the scheduling option and of priorities or nominal fractions. More... | |
Private Member Functions | |
int | ParseInfoFrom (const char *fn) |
Parse config information from the open file 'fin'. More... | |
Private Attributes | |
XrdProofdFile | fCfgFile |
XrdOucHash< XrdProofGroup > | fGroups |
XrdOucString | fIterator |
XrdSysRecMutex | fMutex |
XrdProofdFile | fPriorityFile |
#include <XrdProofGroup.h>
XrdProofGroupMgr::XrdProofGroupMgr | ( | const char * | fn = 0 | ) |
Constructor.
Definition at line 204 of file XrdProofGroup.cxx.
|
inline |
Definition at line 106 of file XrdProofGroup.h.
XrdProofGroup * XrdProofGroupMgr::Apply | ( | int(*)(const char *, XrdProofGroup *, void *) | f, |
void * | arg | ||
) |
Apply function 'f' to the hash table of groups; 'arg' is passed to 'f' in the last argument.
After applying 'f', the action depends on the return value with the following rule: < 0 - the hash table item is deleted. = 0 - the next hash table item is processed. > 0 - processing stops and the hash table item is returned.
Definition at line 218 of file XrdProofGroup.cxx.
int XrdProofGroupMgr::Config | ( | const char * | fn | ) |
(Re-)configure the group info using the file 'fn'.
Return the number of active groups or -1 in case of error.
Definition at line 325 of file XrdProofGroup.cxx.
XrdOucString XrdProofGroupMgr::Export | ( | const char * | grp | ) |
Return a string describing the group.
Definition at line 227 of file XrdProofGroup.cxx.
|
inline |
Definition at line 122 of file XrdProofGroup.h.
XrdProofGroup * XrdProofGroupMgr::GetGroup | ( | const char * | grp | ) |
Returns the instance of for group 'grp.
Return 0 in the case the group does not exist
Definition at line 264 of file XrdProofGroup.cxx.
XrdProofGroup * XrdProofGroupMgr::GetUserGroup | ( | const char * | usr, |
const char * | grp = 0 |
||
) |
Returns the instance of the first group to which this user belongs; if grp != 0, return the instance corresponding to group 'grp', if existing and the // user belongs to it.
Return 0 in the case the user does not belong to any group or does not belong to 'grp'.
Definition at line 281 of file XrdProofGroup.cxx.
XrdProofGroup * XrdProofGroupMgr::Next | ( | ) |
Returns the instance of next group in the pseudo-iterator functionality.
To scan over all the groups do the following: ResetIter(); while ((g = Next())) { // ... Process group } Return 0 when there are no more groups
Definition at line 316 of file XrdProofGroup.cxx.
|
inline |
Definition at line 116 of file XrdProofGroup.h.
|
private |
Parse config information from the open file 'fin'.
Can be called recursively following 'include sub-file' lines. Return 0 or -1 in case of error.
Definition at line 391 of file XrdProofGroup.cxx.
void XrdProofGroupMgr::Print | ( | const char * | grp | ) |
Return a string describing the group.
Definition at line 246 of file XrdProofGroup.cxx.
int XrdProofGroupMgr::ReadPriorities | ( | ) |
Read update priorities from the file defined at configuration time.
Return 1 if the file did not change, 0 if the file has been read correctly, or -1 in case of error.
Definition at line 515 of file XrdProofGroup.cxx.
|
inline |
Definition at line 125 of file XrdProofGroup.h.
Go through the list of active groups (those having at least a non-idle member) and determine the effective resource fraction on the base of the scheduling option and of priorities or nominal fractions.
Return 0 in case of success, -1 in case of error, 1 if every group has the same priority so that the system scheduler should do the job.
Definition at line 659 of file XrdProofGroup.cxx.
|
private |
Definition at line 99 of file XrdProofGroup.h.
|
private |
Definition at line 96 of file XrdProofGroup.h.
|
private |
Definition at line 95 of file XrdProofGroup.h.
|
private |
Definition at line 97 of file XrdProofGroup.h.
|
private |
Definition at line 100 of file XrdProofGroup.h.