12#ifndef ROOT_XrdProofSched
13#define ROOT_XrdProofSched
46#include "XrdOuc/XrdOucHash.hh"
47#include "XrdOuc/XrdOucString.hh"
67 const char *cfn, XrdSysError *
e = 0);
79 std::list<XrdProofWorker *> *,
98 const char *
Name()
const {
return (
const char *) &
fName[0]; }
101 char *val, XrdOucStream *cfg,
bool rcf);
103 virtual void DumpQueues(
const char *prefix = 0);
110 virtual int Config(
bool rcf = 0);
112 char *val, XrdOucStream *cfg,
bool rcf);
virtual int DoDirectiveResource(char *, XrdOucStream *, bool)
Process 'resource' directive.
virtual int GetWorkers(XrdProofdProofServ *xps, std::list< XrdProofWorker * > *, const char *)
Get a list of workers that can be used by session 'xps'.
virtual int MaxSessions() const
virtual int ExportInfo(XrdOucString &)
Fill sbuf with some info about our current status.
virtual int ProcessDirective(XrdProofdDirective *d, char *val, XrdOucStream *cfg, bool rcf)
Update the priorities of the active sessions.
virtual int Reschedule()
Consider starting some query from the queue.
virtual void RegisterDirectives()
Register directives for configuration.
virtual int Enqueue(XrdProofdProofServ *xps, XrdProofQuery *query)
Queue a query in the session; if this is the first querym enqueue also the session.
XrdOucHash< XrdProofdDirective > fConfigDirectives
virtual int UpdateProperties()
virtual int DoDirective(XrdProofdDirective *d, char *val, XrdOucStream *cfg, bool rcf)
Update the priorities of the active sessions.
std::list< XrdProofdProofServ * > fQueue
int CheckFrequency() const
virtual XrdProofdProofServ * FirstSession()
Get first valid session.
virtual void DumpQueues(const char *prefix=0)
Dump the content of the waiting sessions queue.
XrdProofGroupMgr * fGrpMgr
virtual int Config(bool rcf=0)
Configure this instance using the content of file 'cfn'.
const char * Name() const
virtual void ResetParameters()
Reset values for the configurable parameters.
virtual int GetNumWorkers(XrdProofdProofServ *xps)
Calculate the number of workers to be used given the state of the cluster.
virtual int DoDirectiveSchedParam(char *, XrdOucStream *, bool)
Process 'schedparam' directive.
virtual int UpdateSession(XrdProofdProofServ *, int=0, void *=0)