Workspace 6.21.5
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Schedulers Class Reference

Maintains a collection of remote schedulers.

#include <Workspace/DataExecution/Execution/schedulers.h>

Inherits QObject.

Public Types

using const_iterator = SchedulerList::const_iterator
 
typedef std::list< std::unique_ptr< AbstractScheduler > > SchedulerList
 

Public Member Functions

 Schedulers ()
 
 ~Schedulers () override
 
void add (std::unique_ptr< AbstractScheduler >)
 
const_iterator begin () const
 
void clear ()
 
int count () const
 
int countOfEnabled () const
 
void demote (AbstractScheduler *)
 
bool empty () const
 
const_iterator end () const
 
int getIdealWorkload () const
 
int indexOf (const AbstractScheduler *) const
 
void load (const SchedulerSettings &)
 
AbstractScheduleroperator[] (int index)
 
const AbstractScheduleroperator[] (int index) const
 
void promote (AbstractScheduler *)
 
std::unique_ptr< AbstractSchedulerremove (int index)
 
void save (SchedulerSettings &) const
 
void schedule (SchedulerRequest &)
 
void scheduleOutOfProcess (SchedulerRequest &)
 
void sort ()
 
void start ()
 
void stop ()
 
bool supports (const SchedulerFeatures &features) const
 

Static Public Member Functions

static AbstractScheduler::Scope indexToScope (int index)
 
static int scopeToIndex (AbstractScheduler::Scope scope)
 
static std::vector< AbstractScheduler::ScopesortedScopes ()
 

Member Typedef Documentation

◆ const_iterator

using const_iterator = SchedulerList::const_iterator

◆ SchedulerList

typedef std::list<std::unique_ptr<AbstractScheduler> > SchedulerList

Constructor & Destructor Documentation

◆ Schedulers()

Schedulers ( )
default

constructs the servers collection

◆ ~Schedulers()

~Schedulers ( )
override

the destructor

Member Function Documentation

◆ add()

void add ( std::unique_ptr< AbstractScheduler sharedPointer)

adds a server to the collection, this is an overload.

Parameters
sharedPointerthe scheduler to add

◆ begin()

const_iterator begin ( ) const
inline

◆ clear()

void clear ( )

clears the servers in the collection

◆ count()

int count ( ) const
Returns
returns a count of the servers in the collection

◆ countOfEnabled()

int countOfEnabled ( ) const
Returns
returns a count of the enabled servers in the collection

◆ demote()

void demote ( AbstractScheduler server)

demotes the provided server

◆ empty()

bool empty ( ) const

Returns true if there are no contained schedulers.

Returns
true if no schedulers are held in this container.

◆ end()

const_iterator end ( ) const
inline

◆ getIdealWorkload()

int getIdealWorkload ( ) const

Returns the ideal workload the list of servers can support.

◆ indexOf()

int indexOf ( const AbstractScheduler server) const
Returns
returns the index of the provided server. If server not presented in the schedulers_, -1 is returned.

◆ indexToScope()

AbstractScheduler::Scope indexToScope ( int  index)
static

Get scope from a 0 based index.

◆ load()

void load ( const SchedulerSettings settings)

◆ operator[]() [1/2]

AbstractScheduler * operator[] ( int  index)

array access operator

Parameters
indexthe index of the element to return
Returns
returns the server at index

◆ operator[]() [2/2]

const AbstractScheduler * operator[] ( int  index) const

array access operator

Parameters
indexthe index of the element to return
Returns
returns the server at index

◆ promote()

void promote ( AbstractScheduler server)

promotes the provided server

◆ remove()

std::unique_ptr< AbstractScheduler > remove ( int  index)

removes a server from the collection

Parameters
indexthe index of the server to remove
Exceptions
std::out_of_rangeexception

◆ save()

void save ( SchedulerSettings settings) const

◆ schedule()

void schedule ( SchedulerRequest request)

Schedules a workspace request.

◆ scheduleOutOfProcess()

void scheduleOutOfProcess ( SchedulerRequest request)

Schedules a SchedulerRequest to run out of process.

Parameters
requestThe SchedulerRequest to schedule.

◆ scopeToIndex()

int scopeToIndex ( AbstractScheduler::Scope  scope)
static

Get 0 based index of scopes when sorted. static method

◆ sort()

void sort ( )

sort the servers

◆ sortedScopes()

std::vector< AbstractScheduler::Scope > sortedScopes ( )
static

Get scope from a 0 based index.

◆ start()

void start ( )

◆ stop()

void stop ( )

◆ supports()

bool supports ( const SchedulerFeatures features) const

Returns true if at least one contained scheduler supports the provided features.