treqs::QueueDAO Class Reference
Managing Queues object updates to database.
More...
#include <QueueDAO.h>
List of all members.
Public Member Functions |
bool | update (time_t t, QueueStatus qs, int nbjobs, int nbdone, int nbfailed, std::string owner, unsigned long long int size, unsigned long id) |
bool | update (int nbjobs, std::string owner, unsigned long long int size, unsigned long id) |
unsigned long | insert (QueueStatus qs, std::string name, int nbjobs, int pvrid, std::string owner, unsigned long long int size, time_t creation_time) |
Static Public Member Functions |
static QueueDAO * | getInstance () |
Private Member Functions |
| QueueDAO () |
virtual | ~QueueDAO () |
Static Private Attributes |
static QueueDAO * | _singleton = 0 |
static LoggerPtr | logger |
Detailed Description
Managing Queues object updates to database.
Constructor & Destructor Documentation
treqs::QueueDAO::QueueDAO |
( |
|
) |
[private] |
treqs::QueueDAO::~QueueDAO |
( |
|
) |
[private, virtual] |
Member Function Documentation
QueueDAO * treqs::QueueDAO::getInstance |
( |
|
) |
[static] |
unsigned long treqs::QueueDAO::insert |
( |
QueueStatus |
qs, |
|
|
std::string |
name, |
|
|
int |
nbjobs, |
|
|
int |
pvrid, |
|
|
std::string |
owner, |
|
|
unsigned long long int |
size, |
|
|
time_t |
creation_time | |
|
) |
| | |
insert a queue entry in the table
- Parameters:
-
| qs | the status of the queue |
| name | the name of the queue |
| nbjobs | the number of jobs registered in the queue |
| pvrid | the id of the PVR |
| owner | the owner of the queue |
| size | the total size of the queue |
| creation_time | the time when the queue was created |
- Returns:
- the unique ID of the new queue
bool treqs::QueueDAO::update |
( |
int |
nbjobs, |
|
|
std::string |
owner, |
|
|
unsigned long long int |
size, |
|
|
unsigned long |
id | |
|
) |
| | |
Update a queue entry to log the new number of jobs. Usualy called after a new file registration
- Parameters:
-
| nbjobs | the number of jobs registered in the queue |
| owner | the owner of the queue |
| size | the total size of the queue |
| id | the unique ID of the queue |
- Returns:
- true if the request updated one or more rows
bool treqs::QueueDAO::update |
( |
time_t |
t, |
|
|
QueueStatus |
qs, |
|
|
int |
nbjobs, |
|
|
int |
nbdone, |
|
|
int |
nbfailed, |
|
|
std::string |
owner, |
|
|
unsigned long long int |
size, |
|
|
unsigned long |
id | |
|
) |
| | |
Update a queue entry in the queues table
- Parameters:
-
| t | a time for update. Can be activation or end time |
| qs | the status of the queue |
| nbjobs | the number of jobs registered in the queue |
| nbdone | the number of jobs done |
| nbfailed | the number of jobs failed |
| owner | the owner of the queue |
| size | the total size of the queue |
| id | the unique ID of the queue |
- Returns:
- true if the request updated one or more rows
Member Data Documentation
The documentation for this class was generated from the following files:
- /home/gomez/Documents/workspaces/treqs/treqs/src/QueueDAO.h
- /home/gomez/Documents/workspaces/treqs/treqs/src/QueueDAO.cpp