treqs::Dispatcher Class Reference

This class scans new jobs and assign the requests to queues. More...

#include <Dispatcher.h>

Inheritance diagram for treqs::Dispatcher:
Inheritance graph
[legend]
Collaboration diagram for treqs::Dispatcher:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Dispatcher ()
virtual ~Dispatcher ()

Private Member Functions

std::multimap< std::string,
FileRequest
get_new_requests ()
 Scans new requests via DBUtils.
bool checkFilePermission (File *f, User *u)
 Verify the permissions on a file against the user requesting it.
bool OnTask ()
 Run periodically over the database to do the work.

Static Private Attributes

static LoggerPtr logger
 The logger of this class.

Detailed Description

This class scans new jobs and assign the requests to queues.


Constructor & Destructor Documentation

treqs::Dispatcher::Dispatcher (  ) 
treqs::Dispatcher::~Dispatcher (  )  [virtual]

Member Function Documentation

bool treqs::Dispatcher::checkFilePermission ( File f,
User u 
) [private]

Verify the permissions on a file against the user requesting it.

Parameters:
f A reference to the file object
u A reference to the user object
Returns:
true if the permissions are OK, false otherwise
std::multimap< std::string, FileRequest > treqs::Dispatcher::get_new_requests (  )  [private]

Scans new requests via DBUtils.

Puts all new requests in the RequestsList container

Returns:
A map of all the new requests. The key is the filename

Here is the call graph for this function:

Here is the caller graph for this function:

bool treqs::Dispatcher::OnTask (  )  [private, virtual]

Run periodically over the database to do the work.

Call get_new_requests() and treat all the results

Reimplemented from CThread.

Here is the call graph for this function:


Member Data Documentation

LoggerPtr treqs::Dispatcher::logger [static, private]

The logger of this class.


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

Generated on 4 Mar 2010 for TReqS by  doxygen 1.6.1