Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
berry::IJobManager Struct Referenceabstract

#include <berryIJobManager.h>

Inheritance diagram for berry::IJobManager:
Collaboration diagram for berry::IJobManager:

Public Member Functions

 berryObjectMacro (berry::IJobManager)
 
virtual void AddJobChangeListener (IJobChangeListener *listener)=0
 
virtual IProgressMonitor::Pointer CreateProgressGroup ()=0
 
virtual bool IsIdle ()=0
 
virtual bool IsSuspended ()=0
 
virtual void RemoveJobChangeListener (IJobChangeListener *listener)=0
 
virtual void SetProgressProvider (ProgressProvider::Pointer provider)=0
 
- Public Member Functions inherited from berry::Object
virtual QString GetClassName () const
 
virtual Reflection::TypeInfo GetTypeInfo () const
 
virtual QList< Reflection::TypeInfoGetSuperclasses () const
 
virtual void Delete ()
 
QDebug Print (QDebug os, Indent Indent=0) const
 
virtual QString ToString () const
 
virtual uint HashCode () const
 
virtual bool operator< (const Object *) const
 
void Register () const
 
void UnRegister (bool del=true) const
 
int GetReferenceCount () const
 
void SetReferenceCount (int)
 
void AddDestroyListener (const MessageAbstractDelegate<> &delegate) const
 
void RemoveDestroyListener (const MessageAbstractDelegate<> &delegate) const
 
virtual bool operator== (const Object *) const
 

Static Public Attributes

static const std::string PROP_USE_DAEMON_THREADS
 

Additional Inherited Members

- Public Types inherited from berry::Object
typedef Object Self
 
typedef berry::SmartPointer< SelfPointer
 
typedef berry::SmartPointer< const SelfConstPointer
 
typedef berry::WeakPointer< SelfWeakPtr
 
typedef berry::WeakPointer< const SelfConstWeakPtr
 
- Static Public Member Functions inherited from berry::Object
static const char * GetStaticClassName ()
 
static Reflection::TypeInfo GetStaticTypeInfo ()
 
static QList< Reflection::TypeInfoGetStaticSuperclasses ()
 
- Protected Member Functions inherited from berry::Object
 Object ()
 
virtual ~Object ()
 
virtual QDebug PrintSelf (QDebug os, Indent indent) const
 
virtual QDebug PrintHeader (QDebug os, Indent indent) const
 
virtual QDebug PrintTrailer (QDebug os, Indent indent) const
 
- Protected Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
 
QMutex m_ReferenceCountLock
 

Detailed Description

The job manager provides facilities for scheduling, querying, and maintaining jobs and locks. In particular, the job manager provides the following services:

  • Maintains a queue of jobs that are waiting to be run. Items can be added to the queue using the schedule method.
  • Allows listeners to find out about progress on running jobs, and to find out when jobs have changed states.
  • Provide feedback to a client that is waiting for a given job or family of jobs to complete.
See also
Job
ILock
Note
This interface is not intended to be implemented by clients.

Definition at line 54 of file berryIJobManager.h.

Member Function Documentation

◆ AddJobChangeListener()

virtual void berry::IJobManager::AddJobChangeListener ( IJobChangeListener listener)
pure virtual

Registers a job listener with the job manager. Has no effect if an identical listener is already registered.

Parameters
listenerthe listener to be added
See also
RemoveJobChangeListener
IJobChangeListener

◆ berryObjectMacro()

berry::IJobManager::berryObjectMacro ( berry::IJobManager  )

◆ CreateProgressGroup()

virtual IProgressMonitor::Pointer berry::IJobManager::CreateProgressGroup ( )
pure virtual

Returns a progress monitor that can be used to provide aggregated progress feedback on a set of running jobs. A user interface will typically group all jobs in a progress group together, providing progress feedback for individual jobs as well as aggregated progress for the entire group. Jobs in the group may be run sequentially, in parallel, or some combination of the two.

Recommended usage (this snippet runs two jobs in sequence in a single progress group):

Job parseJob, compileJob;
IProgressMonitor pm = Platform.getJobManager().createProgressGroup();
try {
pm.beginTask("Building", 10);
parseJob.setProgressGroup(pm, 5);
parseJob.schedule();
compileJob.setProgressGroup(pm, 5);
compileJob.schedule();
parseJob.join();
compileJob.join();
} finally {
pm.done();
}
See also
Job::SetProgressGroup
IProgressMonitor
Returns
a progress monitor

◆ IsIdle()

virtual bool berry::IJobManager::IsIdle ( )
pure virtual

Returns whether the job manager is currently idle. The job manager is idle if no jobs are currently running or waiting to run.

Returns
true if the job manager is idle, and false otherwise
Since
3.1

◆ IsSuspended()

virtual bool berry::IJobManager::IsSuspended ( )
pure virtual

Returns whether the job manager is currently suspended.

Returns
true if the job manager is suspended, and false otherwise
Since
3.4

◆ RemoveJobChangeListener()

virtual void berry::IJobManager::RemoveJobChangeListener ( IJobChangeListener listener)
pure virtual

Removes a job listener from the job manager. Has no effect if an identical listener is not already registered.

Parameters
listenerthe listener to be removed
See also
AddJobChangeListener
IJobChangeListener

◆ SetProgressProvider()

virtual void berry::IJobManager::SetProgressProvider ( ProgressProvider::Pointer  provider)
pure virtual

Registers a progress provider with the job manager. If there was a provider already registered, it is replaced.

This method is intended for use by the currently executing Eclipse application. Plug-ins outside the currently running application should not call this method.

Parameters
providerthe new provider, or null if no progress is needed

Member Data Documentation

◆ PROP_USE_DAEMON_THREADS

const std::string berry::IJobManager::PROP_USE_DAEMON_THREADS
static

A system property key indicating whether the job manager should create job threads as daemon threads. Set to true to force all worker threads to be created as daemon threads. Set to false to force all worker threads to be created as non-daemon threads.

not used yet

Definition at line 67 of file berryIJobManager.h.


The documentation for this struct was generated from the following file: