Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | Friends
JobDescription Class Reference

#include <job.h>

Collaboration diagram for JobDescription:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 JobDescription (void)
 JobDescription (const JobDescription &job)
 JobDescription (const JobId &job_id, const std::string &dir, job_state_t state=JOB_STATE_UNDEFINED)
 ~JobDescription (void)
job_state_t get_state () const
const char * get_state_name () const
const JobIdget_id () const
std::string SessionDir (void) const
void AddFailure (const std::string &reason)
const std::string & GetFailure (void) const
JobLocalDescriptionget_local (void) const
void set_local (JobLocalDescription *desc)
bool operator== (const JobId &id)
bool operator!= (const JobId &id)
void set_uid (uid_t uid, gid_t gid)
uid_t get_uid (void) const
gid_t get_gid (void) const
void set_share (std::string share)
bool GetLocalDescription (const JobUser &user)

Static Public Member Functions

static const char * get_state_name (job_state_t st)
static job_state_t get_state (const char *state)

Public Attributes

Arc::Runchild

Private Attributes

job_state_t job_state
bool job_pending
JobId job_id
std::string session_dir
std::string failure_reason
time_t keep_finished
time_t keep_deleted
JobLocalDescriptionlocal
uid_t job_uid
gid_t job_gid
int retries
time_t next_retry
std::string transfer_share

Friends

class JobsList

Detailed Description

Definition at line 73 of file job.h.


Constructor & Destructor Documentation

Definition at line 69 of file job.cpp.

JobDescription::JobDescription ( const JobId job_id,
const std::string &  dir,
job_state_t  state = JOB_STATE_UNDEFINED 
)

Definition at line 108 of file job.cpp.

                                   {
 /* child is not destroyed here */
}

Member Function Documentation

void JobDescription::AddFailure ( const std::string &  reason) [inline]

Definition at line 123 of file job.h.

                                           {
    //if(failure_reason.length()) failure_reason+="\n";
    failure_reason+=reason; failure_reason+="\n";
  };
gid_t JobDescription::get_gid ( void  ) const [inline]

Definition at line 138 of file job.h.

{ return job_gid; };

Here is the caller graph for this function:

const JobId& JobDescription::get_id ( ) const [inline]

Definition at line 121 of file job.h.

{ return job_id; };

Here is the caller graph for this function:

JobLocalDescription* JobDescription::get_local ( void  ) const [inline]

Definition at line 128 of file job.h.

{ return local; };

Here is the caller graph for this function:

Definition at line 117 of file job.h.

{ return job_state; };

Here is the caller graph for this function:

job_state_t JobDescription::get_state ( const char *  state) [static]

Definition at line 58 of file job.cpp.

                                                       {
  for(int i = 0;i<JOB_STATE_NUM;i++) {
    if(!strcmp(state_names[i],state)) return (job_state_t)i;
  };
  return JOB_STATE_UNDEFINED;
}
const char * JobDescription::get_state_name ( ) const

Definition at line 46 of file job.cpp.

Here is the caller graph for this function:

const char * JobDescription::get_state_name ( job_state_t  st) [static]

Definition at line 52 of file job.cpp.

                                                         {
  if((st<0) || (st>=JOB_STATE_NUM))
                       return state_names[JOB_STATE_UNDEFINED];
  return state_names[st];
}
uid_t JobDescription::get_uid ( void  ) const [inline]

Definition at line 137 of file job.h.

{ return job_uid; };

Here is the caller graph for this function:

const std::string& JobDescription::GetFailure ( void  ) const [inline]

Definition at line 127 of file job.h.

{ return failure_reason; };

Here is the caller graph for this function:

Definition at line 112 of file job.cpp.

                                                            {
  if(local) return true;
  JobLocalDescription* job_desc;
  job_desc=new JobLocalDescription;
  if(!job_local_read_file(job_id,user,*job_desc)) {
    delete job_desc;
    return false;
  };
  local=job_desc;
  return true;
}

Here is the call graph for this function:

Here is the caller graph for this function:

bool JobDescription::operator!= ( const JobId id) [inline]

Definition at line 132 of file job.h.

{ return (job_id != id); };
bool JobDescription::operator== ( const JobId id) [inline]

Definition at line 131 of file job.h.

{ return (job_id == id); };
std::string JobDescription::SessionDir ( void  ) const [inline]

Definition at line 122 of file job.h.

{ return session_dir; };

Here is the caller graph for this function:

Definition at line 129 of file job.h.

{ local=desc; };

Here is the caller graph for this function:

void JobDescription::set_share ( std::string  share)

Definition at line 65 of file job.cpp.

void JobDescription::set_uid ( uid_t  uid,
gid_t  gid 
) [inline]

Definition at line 133 of file job.h.

                                    {
    if(uid != (uid_t)(-1)) { job_uid=uid; };
    if(gid != (uid_t)(-1)) { job_gid=gid; };
  };

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class JobsList [friend]

Definition at line 74 of file job.h.


Member Data Documentation

Definition at line 105 of file job.h.

std::string JobDescription::failure_reason [private]

Definition at line 86 of file job.h.

gid_t JobDescription::job_gid [private]

Definition at line 95 of file job.h.

Definition at line 82 of file job.h.

Definition at line 80 of file job.h.

Definition at line 77 of file job.h.

uid_t JobDescription::job_uid [private]

Definition at line 94 of file job.h.

time_t JobDescription::keep_deleted [private]

Definition at line 89 of file job.h.

Definition at line 88 of file job.h.

Definition at line 92 of file job.h.

time_t JobDescription::next_retry [private]

Definition at line 99 of file job.h.

int JobDescription::retries [private]

Definition at line 97 of file job.h.

std::string JobDescription::session_dir [private]

Definition at line 84 of file job.h.

std::string JobDescription::transfer_share [private]

Definition at line 101 of file job.h.


The documentation for this class was generated from the following files: