Workspace 6.21.5
Public Slots | Signals | Public Member Functions | Static Public Member Functions | List of all members
SchedulerClient Class Reference

#include <Workspace/Application/Server/schedulerclient.h>

Inherits QObject.

Public Slots

void disconnect (bool abort=false)
 

Signals

void connected ()
 
void disconnected ()
 
void error (QAbstractSocket::SocketError socketError)
 
void handshake ()
 
void handshakeTimedout ()
 
void notifyFailure (SchedulerRequest &, const CSIRO::DataExecution::AbortReason &abortReason, const QString &text="")
 
void notifyList (const QList< WorkspaceBrief > &, bool isQueuedList)
 
void notifyLog (const QString &uuid, const QString &log, int startBytes)
 
void notifyOperationUpdateEventList (const ExecutionTimekeeper::EventList &eventList)
 
void notifyProgress (SchedulerRequest &, int percentComplete)
 
void notifyStarted (SchedulerRequest &)
 
void notifySuccess (SchedulerRequest &)
 
void stateChanged (QAbstractSocket::SocketState)
 

Public Member Functions

 SchedulerClient ()
 
 ~SchedulerClient () override
 
QFuture< void > changeRequestPriority (const QString &uuid, SchedulerController::TypeOfPriorityChange type)
 
QFuture< void > clearHistory ()
 
void connect ()
 
QString errorString () const
 
const QString & getAuthenticationCredentials () const
 Get credentials for the authentication provider.
 
const QString & getAuthenticationProvider () const
 Get authentication provider.
 
const QString & getAuthenticationProviderVersion () const
 Get authentication provider version.
 
int getCurrentScheduledJob () const
 
QString getHostName () const
 Get host name.
 
QFuture< void > getListAllWorkspace ()
 
QFuture< void > getListQueueWorkspace ()
 
const QMap< QString, int > & getOccupiedFeatures () const
 
quint16 getPort () const
 Get port.
 
int getServerTimeDiffWarningTimeInMs () const
 Get server time difference thresold (in ms), will warn if server time is having a bigger diff from the client than this.
 
int getTotalJob () const
 
bool getUseSecureConnection () const
 Get flag if using secure connection.
 
double getWorkload (int maxConcurrentJob) const
 
QFuture< void > getWorkspaceDetail (const QString &uuid, const QString &sessionId, int logStartBytes)
 
bool isConnected () const
 
bool isConnecting () const
 
bool isPauseDelayed () const
 
bool isReady () const
 
QString localAddr () const
 
void pauseDelayed (bool pause)
 
void scheduleRequest (SchedulerRequest &)
 
QString serverId () const
 
QString sessionId () const
 
void setAuthenticationCredentials (const QString &credentials)
 Set credentials for the authentication provider.
 
void setAuthenticationProvider (const QString &method)
 Set authentication provider.
 
void setAuthenticationProviderVersion (const QString &version)
 Set authentication provider version.
 
void setHostName (QString host)
 Set host name.
 
void setPort (quint16 port)
 Set port.
 
void setServerTimeDiffWarningTimeInMs (int diffTime)
 Set server time difference thresold (in ms) for warning.
 
void setUseSecureConnection (bool secure)
 Set if secure connection should be used.
 
void stopRequest (SchedulerRequest &)
 
qint64 timeOffset () const
 

Static Public Member Functions

template<typename Func >
static void ensureConnectAndCall (QSharedPointer< SchedulerClient > client, Func f)
 
static SchedulerFeature featureAnyHost ()
 
static SchedulerFeature featureHost (QString name)
 

Constructor & Destructor Documentation

◆ SchedulerClient()

◆ ~SchedulerClient()

~SchedulerClient ( )
override

Destructs the SchedulerClient.

Member Function Documentation

◆ changeRequestPriority()

QFuture< void > changeRequestPriority ( const QString &  uuid,
SchedulerController::TypeOfPriorityChange  type 
)

◆ clearHistory()

QFuture< void > clearHistory ( )

◆ connect()

void connect ( )

Establishes a connection to the SchedulerClient.

◆ connected

void connected ( )
signal

◆ disconnect

void disconnect ( bool  abort = false)
slot

Disconnects the SchedulerClient.

◆ disconnected

void disconnected ( )
signal

◆ ensureConnectAndCall()

static void ensureConnectAndCall ( QSharedPointer< SchedulerClient client,
Func  f 
)
inlinestatic

◆ error

void error ( QAbstractSocket::SocketError  socketError)
signal

◆ errorString()

QString errorString ( ) const

◆ featureAnyHost()

SchedulerFeature featureAnyHost ( )
static

Name for the feature for host-any.

◆ featureHost()

SchedulerFeature featureHost ( QString  name)
static

Name for the feature for a specific host.

◆ getAuthenticationCredentials()

const QString & getAuthenticationCredentials ( ) const

◆ getAuthenticationProvider()

const QString & getAuthenticationProvider ( ) const

◆ getAuthenticationProviderVersion()

const QString & getAuthenticationProviderVersion ( ) const

◆ getCurrentScheduledJob()

int getCurrentScheduledJob ( ) const
inline

◆ getHostName()

QString getHostName ( ) const

◆ getListAllWorkspace()

QFuture< void > getListAllWorkspace ( )

Request everything non-queued, the returned message contains a list of workflows but the order of it doesn't matter.

◆ getListQueueWorkspace()

QFuture< void > getListQueueWorkspace ( )

Request queued workflows, the returned message contains a list of workflows ordered by the queue.

Returns
future to get the reply

◆ getOccupiedFeatures()

const QMap< QString, int > & getOccupiedFeatures ( ) const
inline

◆ getPort()

quint16 getPort ( ) const

◆ getServerTimeDiffWarningTimeInMs()

int getServerTimeDiffWarningTimeInMs ( ) const

◆ getTotalJob()

int getTotalJob ( ) const
inline

◆ getUseSecureConnection()

bool getUseSecureConnection ( ) const

◆ getWorkload()

double getWorkload ( int  maxConcurrentJob) const
Parameters
maxConcurrentJobSpecify the max concurrent job to calculate the workload. With the same amount of jobs, providing a bigger max concurrent job end up with lower workload.

Normalized workload. 0 is free, 1 is busy.

◆ getWorkspaceDetail()

QFuture< void > getWorkspaceDetail ( const QString &  uuid,
const QString &  sessionId,
int  logStartBytes 
)

Request everything non-queued, the returned message contains a list of workflows but the order of it doesn't matter.

◆ handshake

void handshake ( )
signal

◆ handshakeTimedout

void handshakeTimedout ( )
signal

◆ isConnected()

bool isConnected ( ) const

Returns true if the SchedulerClient is connected, false if not.

Returns
True if connected, False if not.

◆ isConnecting()

bool isConnecting ( ) const

Returns true if the SchedulerClient is connecting, false if not.

Returns
True if connecting, False if not.

◆ isPauseDelayed()

bool isPauseDelayed ( ) const

◆ isReady()

bool isReady ( ) const

◆ localAddr()

QString localAddr ( ) const

◆ notifyFailure

void notifyFailure ( SchedulerRequest ,
const CSIRO::DataExecution::AbortReason abortReason,
const QString &  text = "" 
)
signal

◆ notifyList

void notifyList ( const QList< WorkspaceBrief > &  ,
bool  isQueuedList 
)
signal

◆ notifyLog

void notifyLog ( const QString &  uuid,
const QString &  log,
int  startBytes 
)
signal

◆ notifyOperationUpdateEventList

void notifyOperationUpdateEventList ( const ExecutionTimekeeper::EventList eventList)
signal

◆ notifyProgress

void notifyProgress ( SchedulerRequest ,
int  percentComplete 
)
signal

◆ notifyStarted

void notifyStarted ( SchedulerRequest )
signal

◆ notifySuccess

void notifySuccess ( SchedulerRequest )
signal

◆ pauseDelayed()

void pauseDelayed ( bool  pause)

Request scheduler to pause or resume delayed workflows.

◆ scheduleRequest()

void scheduleRequest ( SchedulerRequest request)

◆ serverId()

QString serverId ( ) const

◆ sessionId()

QString sessionId ( ) const

◆ setAuthenticationCredentials()

void setAuthenticationCredentials ( const QString &  credentials)

◆ setAuthenticationProvider()

void setAuthenticationProvider ( const QString &  method)

◆ setAuthenticationProviderVersion()

void setAuthenticationProviderVersion ( const QString &  version)

◆ setHostName()

void setHostName ( QString  host)

◆ setPort()

void setPort ( quint16  port)

◆ setServerTimeDiffWarningTimeInMs()

void setServerTimeDiffWarningTimeInMs ( int  diffTime)

◆ setUseSecureConnection()

void setUseSecureConnection ( bool  secure)

◆ stateChanged

void stateChanged ( QAbstractSocket::SocketState  )
signal

◆ stopRequest()

void stopRequest ( SchedulerRequest request)

◆ timeOffset()

qint64 timeOffset ( ) const