Back to index

nordugrid-arc-nox  1.1.0~rc6
run_parallel.h
Go to the documentation of this file.
00001 #ifndef GRID_MANAGER_RUN_PARALLEL_H
00002 #define GRID_MANAGER_RUN_PARALLEL_H
00003 
00004 #include <arc/Run.h>
00005 
00006 #include "../jobs/users.h"
00007 #include "../jobs/states.h"
00008 #include "run_plugin.h"
00009 
00010 class RunParallel {
00011  private:
00012   RunParallel(JobUser& user,const char* jobid,bool su,bool job_proxy,RunPlugin* cred,RunPlugin::substitute_t subst,void* subst_arg):user_(user),jobid_(jobid?jobid:""),su_(su),job_proxy_(job_proxy),cred_(cred),subst_(subst),subst_arg_(subst_arg) { };
00013   ~RunParallel(void) { };
00014   JobUser& user_;
00015   std::string jobid_;
00016   bool su_;
00017   bool job_proxy_;
00018   RunPlugin* cred_;
00019   RunPlugin::substitute_t subst_;
00020   void* subst_arg_;
00021   static void initializer(void* arg);
00022   static void (*kicker_func_)(void*);
00023   static void* kicker_arg_;
00024  public:
00025   operator bool(void) { return true; };
00026   bool operator!(void) { return false; };
00027   static bool run(JobUser& user,const char* jobid,const char *const args[],Arc::Run**,bool su = true,bool job_proxy = true, RunPlugin* cred = NULL, RunPlugin::substitute_t subst = NULL, void* subst_arg = NULL);
00028   static bool run(JobUser& user,const JobDescription& desc,const char *const args[],Arc::Run**,bool su = true);
00029   static void kicker(void (*kicker_func)(void*),void* kicker_arg) {
00030     kicker_arg_=kicker_arg;
00031     kicker_func_=kicker_func;
00032   };
00033 };
00034 
00035 #endif