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

dao/src/Queue.h

00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /*
00003 K-10 Distributed Processing - Lium, Le Mans
00004 Copyright (C) 2006
00005 
00006 This program is free software; you can redistribute it and/or
00007 modify it under the terms of the GNU General Public License
00008 as published by the Free Software Foundation; either version 2
00009 of the License, or (at your option) any later version.
00010 
00011 This program is distributed in the hope that it will be useful,
00012 but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 GNU General Public License for more details.
00015 
00016 You should have received a copy of the GNU General Public License
00017 along with this program; if not, write to the Free Software
00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019 */
00020 
00021 #ifndef QUEUE_H
00022 #define QUEUE_H
00023 #include <string>
00024 #include <list>
00025 #include <vector>
00026 #include <iostream>
00027 
00028 #include "Task.h"
00029 #include "PGAgentInfo.h"
00030 
00031 using namespace std;
00032 
00045 class Queue
00046 {
00047 public:
00052  Queue(){}
00057  virtual ~Queue(){}
00058 
00064  virtual list<string> getInWaitTasks()=0;
00070  virtual list<string> getTerminatedTasks()=0;
00076  virtual list<string> getInUseTasks()=0;
00082  virtual list<string> getExpiredTasks()=0;
00083 
00089  virtual void saveTask(Task* aDescriptor)=0;
00094  virtual void updateAging()=0;
00095 
00101  virtual void changeStateToInWait(string& aIdTask)=0;
00107  virtual void changeStateToInUse(string& aIdTask)=0;
00113  virtual void changeStateToExpired(string& aIdTask)=0;
00119  virtual void changeStateToTerminated(string& aIdTask)=0;
00120 
00121  // TODO : create the interface of the agent
00122  //virtual void saveAgent(InfoAgent& aAgentInfo);
00123 
00129  virtual list<string> orderInWaitTasks()=0;
00130 
00139  virtual bool extractTaskToExec(PGAgentInfo * aAgent,Task * aDesc,string& aIp,string& aPort)=0;
00140 
00147  virtual void updateAdvanceTask(string& aTaskId,string& value)=0;
00148 
00155  virtual list<vector<string > > getInformations(string aTaskId)=0;
00156 
00163  virtual void addTaskAgentInUse(string aTask,string aAgent)=0;
00164 
00172  virtual void deleteTaskAgentInUse(string aAgent,bool aError)=0;
00173 
00179  virtual void checkTimeout()=0;
00180 
00185  virtual void eraseBase()=0;
00186 
00187 };
00188 
00189 #endif

Generated on Fri May 19 22:56:55 2006 for k10-controller by  doxygen 1.4.4