This file is indexed.

/usr/include/arc/compute/JobInformationStorageBDB.h is in nordugrid-arc-dev 4.2.0-2.

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
65
66
67
68
69
70
71
72
73
// -*- indent-tabs-mode: nil -*-

#ifndef __ARC_JOBINFORMATIONSTORAGEBDB_H__
#define __ARC_JOBINFORMATIONSTORAGEBDB_H__

#include <db_cxx.h>

#include "JobInformationStorage.h"

namespace Arc {
  
  class JobInformationStorageBDB : public JobInformationStorage {
  public:
    JobInformationStorageBDB(const std::string& name, unsigned nTries = 10, unsigned tryInterval = 500000);
    virtual ~JobInformationStorageBDB() {}

    static JobInformationStorage* Instance(const std::string& name) { return new JobInformationStorageBDB(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);
    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&, u_int32_t = DB_RDONLY);
      ~JobDB();
      
      void tearDown();

#if ((DB_VERSION_MAJOR > 4)||(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3))
      static void handleError(const DbEnv *dbenv, const char *errpfx, const char *msg);
#else
      static void handleError(const char *errpfx, char *msg);
#endif

      Db* operator->() { return jobDB; }
      Db* viaNameKeys() { return nameSecondaryKeyDB; }
      Db* viaEndpointKeys() { return endpointSecondaryKeyDB; }
      Db* viaServiceInfoKeys() { return serviceInfoSecondaryKeyDB; }
      
      DbEnv *dbEnv;
      Db *jobDB;
      Db *endpointSecondaryKeyDB;
      Db *nameSecondaryKeyDB;
      Db *serviceInfoSecondaryKeyDB;
    };
    
    class BDBException {
    public:
      BDBException(const std::string& msg, int ret, bool writeLogMessage = true) throw();
      ~BDBException() 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_JOBINFORMATIONSTORAGEBDB_H__