OpendTect  6.6
clusterjobdispatch.h
Go to the documentation of this file.
1 #pragma once
2 /*+
3 ________________________________________________________________________
4 
5  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
6  Author: Raman K Singh
7  Date: Jan 2016
8  RCS: $Id $
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "mmprocmod.h"
14 #include "singlebatchjobdispatch.h"
15 
16 
17 namespace Batch
18 {
19 
24 public:
25 
27 
28  virtual bool isSuitedFor(const char* prognm) const = 0;
29  virtual bool canHandle( const JobSpec& js ) const
30  { return isSuitedFor( js.prognm_ ); }
31  virtual bool canResume( const JobSpec& js ) const
32  { return false; }
33 
34 };
35 
40 public:
41 
43  virtual ~ClusterJobDispatcher() {}
44 
45  virtual uiString description() const;
46  virtual bool isSuitedFor(const char*) const;
47  virtual bool canHandle(const JobSpec&) const;
48  virtual bool canResume(const JobSpec&) const;
49 
51  "Cluster Process",tr("Cluster Process"));
52 
53  static void addDef(ClusterProgDef*);
54 
55 protected:
56 
57  virtual bool launch(ID*);
58 
59  int defIdx(const char* pnm=0) const;
60 
61 };
62 
63 
64 } // namespace Batch
Batch::ClusterProgDef::mODTextTranslationClass
mODTextTranslationClass(ClusterProgDef)
Batch::ClusterProgDef::canHandle
virtual bool canHandle(const JobSpec &js) const
Definition: clusterjobdispatch.h:29
Batch::ClusterJobDispatcher::launch
virtual bool launch(ID *)
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
Batch::ClusterJobDispatcher::mDefaultFactoryInstantiation
mDefaultFactoryInstantiation(JobDispatcher, SingleJobDispatcher, "Cluster Process", tr("Cluster Process"))
Batch::SingleJobDispatcher
kicks off OD batch jobs in a single process.
Definition: singlebatchjobdispatch.h:26
Batch::ClusterJobDispatcher
kicks off Cluster job dispatcher.
Definition: clusterjobdispatch.h:39
singlebatchjobdispatch.h
Batch::ClusterJobDispatcher::ClusterJobDispatcher
ClusterJobDispatcher()
Batch::JobSpec
the data we need to specify an OD batch job.
Definition: batchjobdispatch.h:29
Batch::ClusterJobDispatcher::description
virtual uiString description() const
Batch::ClusterJobDispatcher::mODTextTranslationClass
mODTextTranslationClass(ClusterJobDispatcher)
Batch::ClusterProgDef
Base class for Cluster prog definitions.
Definition: clusterjobdispatch.h:23
Batch::ClusterJobDispatcher::isSuitedFor
virtual bool isSuitedFor(const char *) const
Batch::JobDispatcher
Base class (with factory) for methods to kick-off an OD batch job.
Definition: batchjobdispatch.h:77
Batch::ClusterJobDispatcher::canHandle
virtual bool canHandle(const JobSpec &) const
Batch::ClusterJobDispatcher::~ClusterJobDispatcher
virtual ~ClusterJobDispatcher()
Definition: clusterjobdispatch.h:43
Batch::ClusterJobDispatcher::defIdx
int defIdx(const char *pnm=0) const
Batch::ClusterJobDispatcher::canResume
virtual bool canResume(const JobSpec &) const
Batch::ClusterProgDef::canResume
virtual bool canResume(const JobSpec &js) const
Definition: clusterjobdispatch.h:31
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
Batch
Definition: batchjobdispatch.h:22
Batch::ID
int ID
Definition: batchjobdispatch.h:24
Batch::ClusterProgDef::isSuitedFor
virtual bool isSuitedFor(const char *prognm) const =0
Batch::JobSpec::prognm_
BufferString prognm_
Definition: batchjobdispatch.h:43
MMProc
Distributed Computing.
Definition: mmassetmgr.h:23
Batch::ClusterProgDef::ClusterProgDef
ClusterProgDef()
Definition: clusterjobdispatch.h:26
Batch::ClusterJobDispatcher::addDef
static void addDef(ClusterProgDef *)

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2021