Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/classCSchedulerEngine.html below:
NCBI C++ ToolKit: CSchedulerEngine Class Reference
Search Toolkit Book for CSchedulerEngine
CSchedulerEngine CSchedulerEngine is an engine that can be used with CAppJobDispatcher. More...
#include <gui/utils/scheduler_engine.hpp>
CSchedulerEngine () CSchedulerEngine. More...
virtual ~CSchedulerEngine () virtual bool IsActive () Returns true if Engine supports "active" model i.e. More...
virtual void SetListener (IAppJobEngineListener *listener) For "active" mode set a Listener that will be notified when the state of a Job changes. More...
void StartJob (IAppJob &job, IEngineParams *) If Engine cannot start the Job and exception shall be thrown. More...
virtual void CancelJob (IAppJob &job) Cancel job in the engine If job is not running yet - just remove from the pending queue otherwise uses IInterruptible to notify the job about cancel request. More...
virtual void SuspendJob (IAppJob &) virtual void ResumeJob (IAppJob &) virtual TJobState GetJobState (IAppJob &job) const virtual void ShutDown () stop any background threads and free resources associated with the Engine More...
virtual void RequestCancel () asyncronous request all jobs to Cancel More...
CObject (void) Constructor. More...
CObject (const CObject &src) Copy constructor. More...
virtual ~CObject (void) Destructor. More...
CObject & operator= (const CObject &src) THROWS_NONE Assignment operator. More...
bool CanBeDeleted (void) const THROWS_NONE Check if object can be deleted. More...
bool IsAllocatedInPool (void) const THROWS_NONE Check if object is allocated in memory pool (not system heap) More...
bool Referenced (void) const THROWS_NONE Check if object is referenced. More...
bool ReferencedOnlyOnce (void) const THROWS_NONE Check if object is referenced only once. More...
void AddReference (void) const Add reference to object. More...
void RemoveReference (void) const Remove reference to object. More...
void ReleaseReference (void) const Remove reference without deleting object. More...
virtual void DoNotDeleteThisObject (void) Mark this object as not allocated in heap – do not delete this object. More...
virtual void DoDeleteThisObject (void) Mark this object as allocated in heap – object can be deleted. More...
void * operator new (size_t size) Define new operator for memory allocation. More...
void * operator new[] (size_t size) Define new[] operator for 'array' memory allocation. More...
void operator delete (void *ptr) Define delete operator for memory deallocation. More...
void operator delete[] (void *ptr) Define delete[] operator for memory deallocation. More...
void * operator new (size_t size, void *place) Define new operator. More...
void operator delete (void *ptr, void *place) Define delete operator. More...
void * operator new (size_t size, CObjectMemoryPool *place) Define new operator using memory pool. More...
void operator delete (void *ptr, CObjectMemoryPool *place) Define delete operator. More...
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const Define method for dumping debug information. More...
CDebugDumpable (void) virtual ~CDebugDumpable (void) void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const void DumpToConsole (void) const virtual ~IAppJobEngine ()
CSchedulerEngine CSchedulerEngine is an engine that can be used with CAppJobDispatcher.
The idea of CSchedulerEngine is to use a single background thread for periodic execution of multiple jobs. This kind of engine is useful for doing quick repetitive tasks such as polling external services every once in while. All jobs share the same thread so they should execute really quick. To be compatible with CSchedulerEngine a job needs to implement IWaitPeriod interface.
Definition at line 60 of file scheduler_engine.hpp.
◆ TJobState ◆ CSchedulerEngine() CSchedulerEngine::CSchedulerEngine ( ) ◆ ~CSchedulerEngine() ◆ CancelJob() void CSchedulerEngine::CancelJob ( IAppJob & job ) virtual ◆ GetJobState() ◆ IsActive() bool CSchedulerEngine::IsActive ( ) virtual ◆ RequestCancel() void CSchedulerEngine::RequestCancel ( ) virtual ◆ ResumeJob() void CSchedulerEngine::ResumeJob ( IAppJob & ) virtual ◆ SetListener() ◆ ShutDown() void CSchedulerEngine::ShutDown ( ) virtual ◆ StartJob() void CSchedulerEngine::StartJob ( IAppJob & job, IEngineParams * params ) virtual
If Engine cannot start the Job and exception shall be thrown.
Implements IAppJobEngine.
Definition at line 103 of file scheduler_engine.cpp.
References IAppJob::eRunning, IAppJob::GetDescr(), i, m_Jobs, m_Listener, m_Mutex, m_WakeSignal, NCBI_THROW, IAppJobEngineListener::OnEngineJobStateChanged(), CSemaphore::Post(), and string.
◆ SuspendJob() void CSchedulerEngine::SuspendJob ( IAppJob & ) virtual ◆ x_GetWaitPeriod() unsigned long CSchedulerEngine::x_GetWaitPeriod ( ) protected ◆ x_RunJob() void CSchedulerEngine::x_RunJob ( ) protected ◆ x_WorkOnThread() void CSchedulerEngine::x_WorkOnThread ( ) protected ◆ CSchedulerEngineThread ◆ m_Jobs ◆ m_Listener ◆ m_Mutex CMutex CSchedulerEngine::m_Mutex mutableprotected ◆ m_StopRequested ◆ m_WakeSignal ◆ m_WorkerThread
The documentation for this class was generated from the following files:
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4