/usr/include/arc/compute/JobInformationStorageSQLite.h is in nordugrid-arc-dev 5.4.2-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | // -*- indent-tabs-mode: nil -*-
#ifndef __ARC_JOBINFORMATIONSTORAGESQLITE_H__
#define __ARC_JOBINFORMATIONSTORAGESQLITE_H__
#include <sqlite3.h>
#include "JobInformationStorage.h"
namespace Arc {
class JobInformationStorageSQLite : public JobInformationStorage {
public:
JobInformationStorageSQLite(const std::string& name, unsigned nTries = 10, unsigned tryInterval = 500000);
virtual ~JobInformationStorageSQLite() {}
static JobInformationStorage* Instance(const std::string& name) { return new JobInformationStorageSQLite(name); }
bool ReadAll(std::list<Job>& jobs, const std::list<std::string>& rejectEndpoints = std::list<std::string>());
bool Read(std::list<Job>& jobs, std::list<std::string>& jobIdentifiers,
const std::list<std::string>& endpoints = std::list<std::string>(),
const std::list<std::string>& rejectEndpoints = std::list<std::string>());
bool Write(const std::list<Job>& jobs, const std::set<std::string>& prunedServices, std::list<const Job*>& newJobs);
bool Clean();
bool Remove(const std::list<std::string>& jobids);
private:
static void logErrorMessage(int err);
static Logger logger;
class JobDB {
public:
JobDB(const std::string& name, bool create = false);
~JobDB();
sqlite3* handle() { return jobDB; }
private:
void tearDown();
void handleError(const char* errpfx, int err);
sqlite3* jobDB;
};
class SQLiteException {
public:
SQLiteException(const std::string& msg, int ret, bool writeLogMessage = true) throw();
~SQLiteException() throw() {}
const std::string& getMessage() const throw() { return message; }
int getReturnValue() const throw() { return returnvalue; }
private:
std::string message;
int returnvalue;
};
};
} // namespace Arc
#endif // __ARC_JOBINFORMATIONSTORAGESQLITE_H__
|