This file is indexed.

/usr/include/arc/compute/JobControllerPlugin.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
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// -*- indent-tabs-mode: nil -*-

#ifndef __ARC_JOBCONTROLLER_H__
#define __ARC_JOBCONTROLLER_H__

/** \file
 * \brief Plugin, loader and argument classes for job controller specialisation.
 */

#include <list>
#include <vector>
#include <string>

#include <arc/URL.h>
#include <arc/compute/Job.h>
#include <arc/loader/Loader.h>
#include <arc/loader/Plugin.h>

namespace Arc {

  class Broker;
  class Logger;
  class UserConfig;

  /**
   * \ingroup accplugins
   * \headerfile JobControllerPlugin.h arc/compute/JobControllerPlugin.h
   */
  class JobControllerPlugin
    : public Plugin {
  protected:
    JobControllerPlugin(const UserConfig& usercfg, PluginArgument* parg)
      : Plugin(parg), usercfg(usercfg) {}
  public:
    virtual ~JobControllerPlugin() {}

    virtual void UpdateJobs(std::list<Job*>& jobs, bool isGrouped = false) const;
    virtual void UpdateJobs(std::list<Job*>& jobs, std::list<std::string>& IDsProcessed, std::list<std::string>& IDsNotProcessed, bool isGrouped = false) const = 0;

    virtual bool CleanJobs(const std::list<Job*>& jobs, bool isGrouped = false) const;
    virtual bool CleanJobs(const std::list<Job*>& jobs, std::list<std::string>& IDsProcessed, std::list<std::string>& IDsNotProcessed, bool isGrouped = false) const = 0;
    virtual bool CancelJobs(const std::list<Job*>& jobs, bool isGrouped = false) const;
    virtual bool CancelJobs(const std::list<Job*>& jobs, std::list<std::string>& IDsProcessed, std::list<std::string>& IDsNotProcessed, bool isGrouped = false) const = 0;
    virtual bool RenewJobs(const std::list<Job*>& jobs, bool isGrouped = false) const;
    virtual bool RenewJobs(const std::list<Job*>& jobs, std::list<std::string>& IDsProcessed, std::list<std::string>& IDsNotProcessed, bool isGrouped = false) const = 0;
    virtual bool ResumeJobs(const std::list<Job*>& jobs, bool isGrouped = false) const;
    virtual bool ResumeJobs(const std::list<Job*>& jobs, std::list<std::string>& IDsProcessed, std::list<std::string>& IDsNotProcessed, bool isGrouped = false) const = 0;

    virtual bool GetJobDescription(const Job& job, std::string& desc_str) const = 0;
    virtual bool GetURLToJobResource(const Job& job, Job::ResourceType resource, URL& url) const = 0;

    virtual std::string GetGroupID() const { return ""; }
    
    virtual const std::list<std::string>& SupportedInterfaces() const { return supportedInterfaces; };

  protected:
    const UserConfig& usercfg;
    std::list<std::string> supportedInterfaces;
    static Logger logger;
  };

  /** Class responsible for loading JobControllerPlugin plugins
   * The JobControllerPlugin objects returned by a JobControllerPluginLoader
   * must not be used after the JobControllerPluginLoader goes out of scope.
   * 
   * \ingroup accplugins
   * \headerfile JobControllerPlugin.h arc/compute/JobControllerPlugin.h
   */
  class JobControllerPluginLoader
    : public Loader {

  public:
    /** Constructor
     * Creates a new JobControllerPluginLoader.
     */
    JobControllerPluginLoader();

    /** Destructor
     * Calling the destructor destroys all JobControllerPlugins loaded
     *  by the JobControllerPluginLoader instance.
     */
    ~JobControllerPluginLoader();

    /** Load a new JobControllerPlugin
     * \param name The name of the JobControllerPlugin to load.
     * \param uc The UserConfig object for the new JobControllerPlugin.
     * \return A pointer to the new JobControllerPlugin (NULL on error).
     */
    JobControllerPlugin* load(const std::string& name, const UserConfig& uc);

    JobControllerPlugin* loadByInterfaceName(const std::string& name, const UserConfig& uc);

  private:
    void initialiseInterfacePluginMap(const UserConfig& uc);
  
    std::multimap<std::string, JobControllerPlugin*> jobcontrollers;
    static std::map<std::string, std::string> interfacePluginMap;
  };

  /**
   * \ingroup accplugins
   * \headerfile JobControllerPlugin.h arc/compute/JobControllerPlugin.h
   */
  class JobControllerPluginArgument : public PluginArgument {
  public:
    JobControllerPluginArgument(const UserConfig& usercfg) : usercfg(usercfg) {}
    ~JobControllerPluginArgument() {}
    operator const UserConfig&() { return usercfg; }
  private:
    const UserConfig& usercfg;
  };

} // namespace Arc

#endif // __ARC_JOBCONTROLLER_H__