This class scans new jobs and assign the requests to queues. More...
#include <Dispatcher.h>
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. |
This class scans new jobs and assign the requests to queues.
treqs::Dispatcher::Dispatcher | ( | ) |
treqs::Dispatcher::~Dispatcher | ( | ) | [virtual] |
Verify the permissions on a file against the user requesting it.
f | A reference to the file object | |
u | A reference to the user object |
std::multimap< std::string, FileRequest > treqs::Dispatcher::get_new_requests | ( | ) | [private] |
Scans new requests via DBUtils.
Puts all new requests in the RequestsList container
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.
LoggerPtr treqs::Dispatcher::logger [static, private] |
The logger of this class.