00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef LOADLEVELERINTERFACE_H
00018 #define LOADLEVELERINTERFACE_H
00019
00020 #ifdef ENABLE_SSH
00021
00022
00024
00025 #include <globalsearch/queueinterfaces/loadlevelerdialog.h>
00026 #include <globalsearch/queueinterfaces/remote.h>
00027
00028 #include <QtCore/QDateTime>
00029 #include <QtCore/QReadWriteLock>
00030 #include <QtCore/QString>
00031 #include <QtCore/QStringList>
00032
00033 namespace GlobalSearch {
00034
00035 class LoadLevelerQueueInterface : public RemoteQueueInterface
00036 {
00037 Q_OBJECT;
00038
00039 public:
00040 explicit LoadLevelerQueueInterface(OptBase *parent,
00041 const QString &settingsFile = "");
00042
00043 virtual ~LoadLevelerQueueInterface();
00044
00045 virtual bool isReadyToSearch(QString *str);
00046
00047 QDialog* dialog();
00048
00049 friend class LoadLevelerConfigDialog;
00050 friend class LoadLevelerTest;
00051
00052 public slots:
00053 void readSettings(const QString &filename = "");
00054 void writeSettings(const QString &filename = "");
00055 bool startJob(Structure *s);
00056 bool stopJob(Structure *s);
00057 QueueInterface::QueueStatus getStatus(Structure *s) const;
00058 void setInterval(const int sec);
00059
00060 protected:
00061
00062 QString parseStatus(const QStringList &statusList,
00063 unsigned int jobId) const;
00064 unsigned int parseJobId(const QString &submissionOutput, bool *ok) const;
00065
00066 QStringList getQueueList() const;
00067
00068 QStringList m_queueData;
00069
00070 QDateTime m_queueTimeStamp;
00071
00072 QReadWriteLock m_queueMutex;
00073
00074 QString m_llq;
00075 QString m_llsubmit;
00076 QString m_llcancel;
00077
00078 int m_interval;
00079
00080 bool m_cleanRemoteOnStop;
00081 };
00082 }
00083
00084 #endif // ENABLE_SSH
00085 #endif // LOADLEVELERINTERFACE_H
00086
00087