Workspace 6.21.5
Public Member Functions | Static Public Member Functions | List of all members
SchedulerSettings Class Referencefinal

Provides access to client side authentication settings.

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

Public Member Functions

 SchedulerSettings ()
 
 ~SchedulerSettings ()
 
void add (const AbstractScheduler &)
 
int count () const
 
std::unique_ptr< AbstractSchedulerget (int index)
 
const SchedulerFeaturesgetLocalSchedulerFeatures () const
 
int getMaxConcurrencyCount () const
 
QString getSchedulerSettingsFilePath () const
 
QString getSchedulerSettingsFilePathAllUser () const
 
const SchedulerFeaturesgetSystemLocalSchedulerFeatures () const
 
bool isWritable (const AbstractScheduler &)
 
bool isWritable (const AbstractScheduler::Scope)
 
bool load ()
 
void loadFrom (const Schedulers &)
 
bool reloadExternalFile (bool userScope)
 
bool save ()
 
void saveTo (Schedulers &) const
 
void set (int index, const AbstractScheduler &)
 
void setLocalSchedulerFeatures (const SchedulerFeatures &)
 
void setMaxConcurrencyCount (int maxConcurrencyCount)
 
void setSchedulerSettingsFilePath (QString path)
 
void setSchedulerSettingsFilePathAllUser (QString path)
 
void setSystemLocalSchedulerFeatures (const SchedulerFeatures &)
 

Static Public Member Functions

static bool exportScheduler (const std::list< AbstractScheduler * > &schedulers, const QString &filename)
 
static int importScheduler (std::list< std::unique_ptr< AbstractScheduler > > &schedulers, const QString &filename)
 

Constructor & Destructor Documentation

◆ SchedulerSettings()

Constructor.

◆ ~SchedulerSettings()

~SchedulerSettings ( )
default

Destructor.

Member Function Documentation

◆ add()

void add ( const AbstractScheduler scheduler)

Add a new Scheduler

◆ count()

int count ( ) const

◆ exportScheduler()

bool exportScheduler ( const std::list< AbstractScheduler * > &  schedulers,
const QString &  filename 
)
static

Export schedulers to a file.

Parameters
schedulersa list of scheduler instance to export
filenamethe filename where the exported settings go
Returns
true if the successfully exported.
See also
importScheduler

◆ get()

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

Returns a copy of scheduler that could be used to change settings

◆ getLocalSchedulerFeatures()

const SchedulerFeatures & getLocalSchedulerFeatures ( ) const

Returns the features associated with the local scheduler.

◆ getMaxConcurrencyCount()

int getMaxConcurrencyCount ( ) const

Returns the max concurrent workspaces of the local scheduler.

◆ getSchedulerSettingsFilePath()

QString getSchedulerSettingsFilePath ( ) const

Returns the file for user external scheduler settings.

◆ getSchedulerSettingsFilePathAllUser()

QString getSchedulerSettingsFilePathAllUser ( ) const

Returns the file for system external scheduler settings.

◆ getSystemLocalSchedulerFeatures()

const SchedulerFeatures & getSystemLocalSchedulerFeatures ( ) const

Returns the features associated with the system local scheduler.

◆ importScheduler()

int importScheduler ( std::list< std::unique_ptr< AbstractScheduler > > &  schedulers,
const QString &  filename 
)
static

Import schedulers from a file.

Parameters
schedulersa list of imported scheduler instances
filenamethe filename where the settings imported from.
Returns
-1 if failed, or the total entries attempted from the file. When encounter invalid entries, the number may be bigger than the schedulers.
See also
exportScheduler

◆ isWritable() [1/2]

bool isWritable ( const AbstractScheduler scheduler)

Indicates if the settings area associated with the scheduler is writable or not.

Returns
Returns true if the settings area associated with the scheduler is writable.

◆ isWritable() [2/2]

bool isWritable ( const AbstractScheduler::Scope  scope)

Indicates if the settings area for the provided scope is writable or not.

Returns
Returns true if the settings area for the provided scope is writable.

◆ load()

bool load ( )

Loads scheduler settings.

◆ loadFrom()

void loadFrom ( const Schedulers schedulers)

sync with a Schedulers object by getting schedulers from it.

◆ reloadExternalFile()

bool reloadExternalFile ( bool  userScope)

Reloads scheduler settings from external file, discard all schedulers of external file scope.

◆ save()

bool save ( )

Saves the scheduler settings.

Returns
Returns true if the settings where saved correctly.

◆ saveTo()

void saveTo ( Schedulers schedulers) const

sync with a Schedulers object by setting schedulers and add to it.

◆ set()

void set ( int  index,
const AbstractScheduler scheduler 
)

Change the Scheduler at index, if index is out-range of [0, count()), it will be ignored. not the scheduler is only used to get the settings, and no reference will be kept after this call.

◆ setLocalSchedulerFeatures()

void setLocalSchedulerFeatures ( const SchedulerFeatures features)

Sets the features associated with the local scheduler.

◆ setMaxConcurrencyCount()

void setMaxConcurrencyCount ( int  maxConcurrencyCount)

Sets the max concurrent workspaces of the local scheduler.

◆ setSchedulerSettingsFilePath()

void setSchedulerSettingsFilePath ( QString  path)

Sets the filepath for user external scheduler settings.

◆ setSchedulerSettingsFilePathAllUser()

void setSchedulerSettingsFilePathAllUser ( QString  path)

Sets the filepath for system external scheduler settings.

◆ setSystemLocalSchedulerFeatures()

void setSystemLocalSchedulerFeatures ( const SchedulerFeatures features)

Sets the features associated with the system local scheduler.