treqs::QueueDAO Class Reference

Managing Queues object updates to database. More...

#include <QueueDAO.h>

Collaboration diagram for treqs::QueueDAO:
Collaboration graph
[legend]

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 QueueDAOgetInstance ()

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]

Here is the caller graph for this function:

treqs::QueueDAO::~QueueDAO (  )  [private, virtual]

Member Function Documentation

QueueDAO * treqs::QueueDAO::getInstance (  )  [static]

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

QueueDAO * treqs::QueueDAO::_singleton = 0 [static, private]
LoggerPtr treqs::QueueDAO::logger [static, private]

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

Generated on 4 Mar 2010 for TReqS by  doxygen 1.6.1