![]() |
KSquare Utilities
|
#include <KKJob.h>
Inheritance diagram for KKJobManagment::KKJob:Public Types | |
| typedef map< KKStr, ConstructorPtr > | ConstructorIndex |
| typedef KKJobPtr(* | ConstructorPtr) (JobManagerPtr _manager) |
| enum | JobStatus { jsNULL, jsOpen, jsStarted, jsDone, jsExpanded } |
| enum | JobTypes { jtNULL, jtBinaryCombo, jtMultiClass, jtRandomSplit } |
| typedef KKJob * | KKJobPtr |
Public Member Functions | |
| KKJob (const KKJob &j) | |
| KKJob (JobManagerPtr _manager, kkint32 _jobId, kkint32 _parentId, kkint32 _numPorcessesAllowed, RunLog &_log) | |
| KKJob (JobManagerPtr _manager) | |
| ~KKJob () | |
| void | AddPrerequisites (kkint32 _prerequisite) |
| void | AddPrerequisites (VectorInt _prerequisites) |
| virtual void | CompletedJobDataRead (istream &i) |
| Works with 'WriteCompletedJobData'; You use this to load in data written by 'WriteCompletedJobData'. More... | |
| virtual void | CompletedJobDataWrite (ostream &o) |
| Write out completed job results to status file. More... | |
| virtual KKJobPtr | Duplicate () const |
| bool | InPrerequisites (kkint32 _jobId) |
| kkint32 | JobId () const |
| void | JobId (kkint32 _jobId) |
| virtual const char * | JobType () const |
| RunLog & | Log () |
| JobManagerPtr | Manager () const |
| kkint32 | ParentId () const |
| const VectorInt & | Prerequisites () const |
| virtual void | ProcessNode () |
| virtual void | ProcessStatusField (const KKStr &fieldName, const KKStr &fieldValue) |
| Imjpelmentation specific field processing. More... | |
| virtual void | ReFresh (KKJob &j) |
| JobStatus | Status () const |
| void | Status (JobStatus _status) |
| KKStr | StatusStr () const |
| virtual KKStr | ToStatusStr () |
Static Public Member Functions | |
| static KKJobPtr | CallAppropriateConstructor (JobManagerPtr _manager, const KKStr &_jobTypeName, const KKStr &_statusStr) |
| static JobStatus | JobStatusFromStr (const KKStr &statusStr) |
| static KKStr | JobStatusToStr (JobStatus status) |
| static void | JobTypeFromStr (const KKStr &s) |
| static KKStr | JobTypeToStr (JobTypes jt) |
| static void | RegisterConstructor (const KKStr &_name, ConstructorPtr _constructor) |
Public Attributes | |
| RunLog & | log |
Static Public Attributes | |
| static ConstructorIndex | registeredConstructors |
Protected Member Functions | |
| void | PrerequisitesFromStr (const KKStr &s) |
| KKStr | PrerequisitesToStr () const |
| void | ProcessStatusStr (const KKStr &statusStr) |
Protected Attributes | |
| kkint32 | jobId |
| JobManagerPtr | manager |
| kkint32 | numPorcessesAllowed |
| kkint32 | numProcessors |
| kkint32 | parentId |
| VectorInt | prerequisites |
| JobStatus | status |
| typedef map<KKStr, ConstructorPtr> KKJobManagment::KKJob::ConstructorIndex |
| typedef KKJobPtr(* KKJobManagment::KKJob::ConstructorPtr) (JobManagerPtr _manager) |
| typedef KKJob* KKJobManagment::KKJob::KKJobPtr |
| Enumerator | |
|---|---|
| jsNULL | |
| jsOpen | |
| jsStarted | |
| jsDone | |
| jsExpanded | |
Definition at line 71 of file KKJob.h.
| Enumerator | |
|---|---|
| jtNULL | |
| jtBinaryCombo | |
| jtMultiClass | |
| jtRandomSplit | |
| KKJob::KKJob | ( | const KKJob & | j | ) |
Definition at line 42 of file KKJob.cpp.
References jobId, log, manager, numPorcessesAllowed, numProcessors, parentId, prerequisites, and status.
Referenced by Duplicate(), and KKJobManagment::KKJobManager::KKJobManager().
| KKJobManagment::KKJob::KKJob | ( | JobManagerPtr | _manager, |
| kkint32 | _jobId, | ||
| kkint32 | _parentId, | ||
| kkint32 | _numPorcessesAllowed, | ||
| RunLog & | _log | ||
| ) |
| KKJob::KKJob | ( | JobManagerPtr | _manager | ) |
Definition at line 82 of file KKJob.cpp.
References jobId, jsNULL, Log(), log, manager, numPorcessesAllowed, numProcessors, parentId, prerequisites, and status.
| void KKJobManagment::KKJob::AddPrerequisites | ( | kkint32 | _prerequisite | ) |
| void KKJobManagment::KKJob::AddPrerequisites | ( | VectorInt | _prerequisites | ) |
Referenced by KKJobManagment::KKJobList::AllPrequisitesDone(), KKJobManagment::KKJobList::AreAllJobsDone(), Duplicate(), KKJobManagment::KKJobList::JobsStillRunning(), KKJobManagment::KKJobManager::KKJobManager(), KKJobManagment::KKJobList::LocateOpenJob(), KKJobManagment::KKJobManager::Run(), KKJobManagment::KKJobManager::StatusFileProcessLine(), KKJobManagment::KKJobManager::StatusFileProcessLineJobStatusChange(), and KKJobManagment::KKJobManager::ToStatusStr().
|
static |
Definition at line 145 of file KKJob.cpp.
References ProcessStatusStr().
Referenced by KKJobManagment::KKJobManager::StatusFileProcessLine().
|
virtual |
|
virtual |
Write out completed job results to status file.
This method will get called right after the "KKJob" status line gets written when a KKJob is completed. See 'KKJobManager::GetNextSetOfJobs'. If a job needs to write more data to the Status file then you want to put on a single status line this is where you would do it. You write all the text in a format that you want to support. 'KKJobManager' will bracket it with <KKJob jobtype="KKJob::JobType," jobid="####"> and </KKJob>
|
virtual |
Create a duplicate instance.
Reimplemented in KKJobManagment::KKJobManager.
Definition at line 112 of file KKJob.cpp.
References AddPrerequisites(), and KKJob().
Referenced by KKJobManagment::KKJobManager::Run().
| bool KKJobManagment::KKJob::InPrerequisites | ( | kkint32 | _jobId | ) |
|
inline |
Definition at line 118 of file KKJob.h.
References jobId.
Referenced by KKJobManagment::KKJobManager::StatusFileProcessLine().
|
inline |
|
static |
Definition at line 198 of file KKJob.cpp.
References KKB::KKStr::CompareIgnoreCase(), jsDone, jsExpanded, jsNULL, jsOpen, and jsStarted.
Referenced by KKJobManagment::KKJobManager::StatusFileProcessLine(), and KKJobManagment::KKJobManager::StatusFileProcessLineJobStatusChange().
Definition at line 178 of file KKJob.cpp.
References jsDone, jsExpanded, jsOpen, and jsStarted.
Referenced by StatusStr(), and KKJobManagment::KKJobManager::ToStatusStr().
|
virtual |
This will allow us to know which specific implementaion of 'KKJob' an instance really is.
Reimplemented in KKJobManagment::KKJobManager.
|
static |
|
static |
|
inline |
Definition at line 122 of file KKJob.h.
References log.
Referenced by KKJob(), and KKJobManagment::KKJobList::KKJobList().
|
inline |
|
inline |
|
inline |
Definition at line 121 of file KKJob.h.
References prerequisites.
Referenced by KKJobManagment::KKJobList::AllPrequisitesDone().
|
protected |
Definition at line 243 of file KKJob.cpp.
References KKB::KKStr::CompareIgnoreCase(), and KKB::KKStr::Split().
|
protected |
Definition at line 225 of file KKJob.cpp.
References KKB::KKStr::Concat().
Referenced by ToStatusStr().
|
virtual |
Definition at line 119 of file KKJob.cpp.
References KKB::KKException::KKException().
Referenced by KKJobManagment::KKJobManager::Run().
|
protected |
Definition at line 278 of file KKJob.cpp.
References KKB::KKStr::Concat(), and KKB::KKStr::Split().
Referenced by CallAppropriateConstructor().
|
virtual |
Definition at line 163 of file KKJob.cpp.
References jobId, manager, numPorcessesAllowed, numProcessors, parentId, prerequisites, and status.
Referenced by KKJobManagment::KKJobManager::StatusFileProcessLine().
|
static |
Definition at line 135 of file KKJob.cpp.
|
inline |
Definition at line 123 of file KKJob.h.
References status.
Referenced by KKJobManagment::KKJobList::AllPrequisitesDone(), KKJobManagment::KKJobList::AreAllJobsDone(), KKJobManagment::KKJobList::JobsStillRunning(), and KKJobManagment::KKJobList::LocateOpenJob().
|
inline |
Definition at line 127 of file KKJob.h.
References status.
Referenced by KKJobManagment::KKJobManager::StatusFileProcessLineJobStatusChange().
| KKStr KKJob::StatusStr | ( | ) | const |
Definition at line 218 of file KKJob.cpp.
References JobStatusToStr(), and status.
Referenced by ToStatusStr().
|
virtual |
Any derived classes that implement this method must call its base class version 1st.
Reimplemented in KKJobManagment::KKJobManager.
Definition at line 261 of file KKJob.cpp.
References KKB::KKStr::Concat(), jobId, KKB::KKStr::KKStr(), numPorcessesAllowed, numProcessors, parentId, PrerequisitesToStr(), and StatusStr().
Referenced by KKJobManagment::KKJobManager::ToStatusStr().
|
protected |
| RunLog& KKJobManagment::KKJob::log |
|
protected |
|
protected |
The number of Processes that are allowd to process at same time. that is ('numPorcessesAllowed' <= 'numActiveProcessors').
Definition at line 216 of file KKJob.h.
Referenced by KKJob(), ReFresh(), and ToStatusStr().
|
protected |
Number of CPU's that are currently processing this node; That is the number that are currently calling the 'ProcessNode' method.
Definition at line 212 of file KKJob.h.
Referenced by KKJob(), ReFresh(), and ToStatusStr().
|
protected |
Definition at line 210 of file KKJob.h.
Referenced by KKJob(), ParentId(), ReFresh(), and ToStatusStr().
|
protected |
List of JobId's that must complete (jobStatus == jsDone) before this process may be started.
Definition at line 220 of file KKJob.h.
Referenced by KKJob(), Prerequisites(), and ReFresh().
|
static |
|
protected |
Definition at line 224 of file KKJob.h.
Referenced by KKJob(), ReFresh(), KKJobManagment::KKJobManager::Run(), Status(), KKJobManagment::KKJobManager::StatusFileProcessLine(), StatusStr(), KKJobManagment::KKJobManager::ToStatusStr(), and KKJobManagment::KKJobManager::Update().