OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Member Functions | Static Public Member Functions | Properties | List of all members
OpenSim.Framework.Monitoring.JobEngine Class Reference

Classes

class  Job
 

Public Member Functions

 JobEngine (string name, string loggingName)
 
void Start ()
 
void Stop ()
 
Job RemoveNextJob ()
 Remove the next job queued for processing. More...
 
bool QueueJob (string name, Action action, string commonId=null)
 Queue the job for processing. More...
 
bool QueueJob (Job job)
 Queue the job for processing. More...
 

Static Public Member Functions

static Job MakeJob (string name, Action action, string commonId=null)
 Make a job. More...
 

Properties

int LogLevel [get, set]
 
string Name [get, set]
 
string LoggingName [get, set]
 
bool IsRunning [get, set]
 Is this engine running? More...
 
Job CurrentJob [get, set]
 The current job that the engine is running. More...
 
int JobsWaiting [get]
 Number of jobs waiting to be processed. More...
 
int RequestProcessTimeoutOnStop [get, set]
 The timeout in milliseconds to wait for at least one event to be written when the recorder is stopping. More...
 

Detailed Description

Definition at line 37 of file JobEngine.cs.

Constructor & Destructor Documentation

OpenSim.Framework.Monitoring.JobEngine.JobEngine ( string  name,
string  loggingName 
)
inline

Definition at line 90 of file JobEngine.cs.

Member Function Documentation

static Job OpenSim.Framework.Monitoring.JobEngine.MakeJob ( string  name,
Action  action,
string  commonId = null 
)
inlinestatic

Make a job.

We provide this method to replace the constructor so that we can later pool job objects if necessary to reduce memory churn. Normally one would directly call QueueJob() with parameters anyway.

Returns
Parameters
nameName.
actionAction.
commonIdCommon identifier.

Definition at line 159 of file JobEngine.cs.

bool OpenSim.Framework.Monitoring.JobEngine.QueueJob ( string  name,
Action  action,
string  commonId = null 
)
inline

Queue the job for processing.

Returns
true, if job was queued, false otherwise.
Parameters
nameName of job. This appears on the console and in logging.
actionAction to perform.
commonIdCommon identifier for a set of jobs. This is allows a set of jobs to be removed if required (e.g. all jobs for a given agent. Optional.

Definition at line 189 of file JobEngine.cs.

bool OpenSim.Framework.Monitoring.JobEngine.QueueJob ( Job  job)
inline

Queue the job for processing.

Returns
true, if job was queued, false otherwise.
Parameters
jobThe job

Definition at line 200 of file JobEngine.cs.

Job OpenSim.Framework.Monitoring.JobEngine.RemoveNextJob ( )
inline

Remove the next job queued for processing.

Returns null if there is no next job. Will not remove a job currently being performed.

Definition at line 171 of file JobEngine.cs.

void OpenSim.Framework.Monitoring.JobEngine.Start ( )
inline

Definition at line 98 of file JobEngine.cs.

void OpenSim.Framework.Monitoring.JobEngine.Stop ( )
inline

Definition at line 122 of file JobEngine.cs.

Property Documentation

Job OpenSim.Framework.Monitoring.JobEngine.CurrentJob
getset

The current job that the engine is running.

Will be null if no job is currently running.

Definition at line 60 of file JobEngine.cs.

bool OpenSim.Framework.Monitoring.JobEngine.IsRunning
getset

Is this engine running?

Definition at line 52 of file JobEngine.cs.

int OpenSim.Framework.Monitoring.JobEngine.JobsWaiting
get

Number of jobs waiting to be processed.

Definition at line 65 of file JobEngine.cs.

string OpenSim.Framework.Monitoring.JobEngine.LoggingName
getset

Definition at line 47 of file JobEngine.cs.

int OpenSim.Framework.Monitoring.JobEngine.LogLevel
getset

Definition at line 41 of file JobEngine.cs.

string OpenSim.Framework.Monitoring.JobEngine.Name
getset

Definition at line 45 of file JobEngine.cs.

int OpenSim.Framework.Monitoring.JobEngine.RequestProcessTimeoutOnStop
getset

The timeout in milliseconds to wait for at least one event to be written when the recorder is stopping.

Definition at line 70 of file JobEngine.cs.


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