Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

PGQueue Class Reference

API between Database and C for tasks. More...

#include <PGQueue.h>

Inheritance diagram for PGQueue:

Queue List of all members.

Public Member Functions

 PGQueue (string aDbName, string aUser, string aPass, string aHostAddr, string aPort, string aMailServerIp)
 ~PGQueue ()
 PGQueue destructor.
list< string > getInWaitTasks ()
 Get all the tasks in wait.
list< string > getTerminatedTasks ()
 Get all the tasks terminated.
list< string > getInUseTasks ()
 Get all the tasks in use.
list< string > getExpiredTasks ()
 Get all the tasks expired.
void changeStateToInWait (string &aIdTask)
 Permit to put the task in mode in wait.
void changeStateToInUse (string &aIdTask)
 Permit to put the task in mode in use.
void changeStateToExpired (string &aIdTask)
 Permit to put the task in mode expired.
void changeStateToTerminated (string &aIdTask)
 Permit to put the task in mode terminated.
void saveTask (Task *aDescriptor)
void addTaskAgentInUse (string aTask, string aAgent)
void deleteTaskAgentInUse (string aAgent, bool aError)
void updateAging ()
 Permit to update the list of available tasks with aging.
void addTask (string &aId, string &aCreationDate, int aExpiration, int aPriority, string &aTaskName, string &aUserName, string &aUserMail, list< vector< string > > aFilters, list< vector< string > > aDatas, string &aResultLocalPath, string &aResultStoragePath, string &aBinSourcePath, string &aResultCommand)
bool extractTaskToExec (PGAgentInfo *aAgent, Task *aDesc, string &aIp, string &aPort)
list< string > orderInWaitTasks ()
 Permit to reorder the list of tasks in wait.
void updateAdvanceTask (string &aTaskId, string &value)
 Permit to update the advance of the task for task in use.
list< vector< string > > getInformations (string aTaskId)
 Permit to get all the informations of a task.
void checkTimeout ()
 Permit to verify if the agents are still active. If they aren't, they are delete;.
string getPath ()
 Get the path for connection to a database.
void deleteErrorTask (string aTask, string aAgent)
 Permit to delete a task when a problem occurred.
void eraseBase ()
 Delete all the base.
bool getTaskInUse (string aAgent, string aTask)
 verify if the task and agent are in use.
string getMail (string aTask)
 get the mail.
string getResultStorage (string aTask)
 get the result storage.
string getName (string aTask)
 get the name of the task.

Detailed Description

API between Database and C for tasks.

Author:
Richard DUFOUR
Version:
1.0
Date:
17-03-2006
Bug:
no one known
Warning:
beta version
That class defines the api of the language C and postgresql for all the interactions with tasks informations.


Member Function Documentation

PGQueue::changeStateToExpired string &  aIdTask  )  [virtual]
 

Permit to put the task in mode expired.

Parameters:
aIdTask string which is the name of the task.

Implements Queue.

PGQueue::changeStateToInUse string &  aIdTask  )  [virtual]
 

Permit to put the task in mode in use.

Parameters:
aIdTask string which is the name of the task.

Implements Queue.

PGQueue::changeStateToInWait string &  aIdTask  )  [virtual]
 

Permit to put the task in mode in wait.

Parameters:
aIdTask string which is the name of the task.

Implements Queue.

PGQueue::changeStateToTerminated string &  aIdTask  )  [virtual]
 

Permit to put the task in mode terminated.

Parameters:
aIdTask string which is the name of the task.

Implements Queue.

PGQueue::deleteErrorTask string  aTask,
string  aAgent
 

Permit to delete a task when a problem occurred.

Parameters:
aTaskId string is the name of the task.
aAgent string is the name of the agent.

PGQueue::getExpiredTasks  )  [virtual]
 

Get all the tasks expired.

Returns:
list<string> of tasks names.

Implements Queue.

PGQueue::getInformations string  aTaskId  )  [virtual]
 

Permit to get all the informations of a task.

Parameters:
aTaskId string is the name of the task.
Returns:
list<vector<string > > list of informations.

Implements Queue.

PGQueue::getInUseTasks  )  [virtual]
 

Get all the tasks in use.

Returns:
list<string> of tasks names.

Implements Queue.

PGQueue::getInWaitTasks  )  [virtual]
 

Get all the tasks in wait.

Returns:
list<string> of tasks names.

Implements Queue.

PGQueue::getMail string  aTask  ) 
 

get the mail.

Parameters:
aTask string is the name of the task.
Returns:
string

PGQueue::getName string  aTask  ) 
 

get the name of the task.

Parameters:
aTask string is the id of the task.
Returns:
string

PGQueue::getResultStorage string  aTask  ) 
 

get the result storage.

Parameters:
aTask string is the name of the task.
Returns:
string

PGQueue::getTaskInUse string  aAgent,
string  aTask
 

verify if the task and agent are in use.

Parameters:
aTaskId string is the name of the task.
value string is the new value of the advance.
Returns:
bool

PGQueue::getTerminatedTasks  )  [virtual]
 

Get all the tasks terminated.

Returns:
list<string> of tasks names.

Implements Queue.

PGQueue::orderInWaitTasks  )  [virtual]
 

Permit to reorder the list of tasks in wait.

Returns:
list<string> is the list of tasks reordered.

Implements Queue.

PGQueue::updateAdvanceTask string &  aTaskId,
string &  value
[virtual]
 

Permit to update the advance of the task for task in use.

Parameters:
aTaskId string is the name of the task.
value string is the new value of the advance.

Implements Queue.


The documentation for this class was generated from the following file:
Generated on Fri May 19 22:56:55 2006 for k10-controller by  doxygen 1.4.4