.TH "Scheduler Implementation API" 3 "Mon Apr 30 2012" "Version 4.6" "globus scheduler event generator" \" -*- nroff -*- .ad l .nh .SH NAME Scheduler Implementation API \- .SS "Enumerations" .in +1c .ti -1c .RI "enum \fBglobus_scheduler_event_generator_error_t\fP { \fBGLOBUS_SEG_ERROR_TYPE_NULL\fP = 1024, \fBGLOBUS_SEG_ERROR_TYPE_ALREADY_SET\fP, \fBGLOBUS_SEG_ERROR_TYPE_INVALID_MODULE\fP, \fBGLOBUS_SEG_ERROR_TYPE_INVALID_FORMAT\fP, \fBGLOBUS_SEG_ERROR_TYPE_OUT_OF_MEMORY\fP, \fBGLOBUS_SEG_ERROR_TYPE_LOADING_MODULE\fP }" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "globus_result_t \fBglobus_scheduler_event\fP (const char *format,\&.\&.\&.)" .br .ti -1c .RI "globus_result_t \fBglobus_scheduler_event_pending\fP (time_t timestamp, const char *jobid)" .br .ti -1c .RI "globus_result_t \fBglobus_scheduler_event_active\fP (time_t timestamp, const char *jobid)" .br .ti -1c .RI "globus_result_t \fBglobus_scheduler_event_failed\fP (time_t timestamp, const char *jobid, int failure_code)" .br .ti -1c .RI "globus_result_t \fBglobus_scheduler_event_done\fP (time_t timestamp, const char *jobid, int exit_code)" .br .ti -1c .RI "globus_result_t \fBglobus_scheduler_event_generator_get_timestamp\fP (time_t *timestamp)" .br .in -1c .SH "Detailed Description" .PP Scheduler-specific SEG module implementations use this API to issue events to the Job State Monitor\&. Events occur whenever a job is placed in the scheduler's queue (PENDING), begins execution (ACTIVE), terminates successfully (DONE), or ends abnormally (FAILED)\&. .PP A SEG module should register an event with the Globus event driver (most likely using either the Globus Callback or Globus XIO interfaces) in its activation function and then return\&. All events should be triggered from callbacks\&. When the SEG detects that it should terminate, it will deactivate the SEG module it started\&. The SEG module should wait for any outstanding callbacks to subside and before returning from its deactivation function to ensure that all events will be properly dispatched\&. After deactivation is complete, the SEG will unload the shared module and terminate\&. .SH "Enumeration Type Documentation" .PP .SS "enum \fBglobus_scheduler_event_generator_error_t\fP" .PP Error types used by the SEG\&. .PP \fBEnumerator: \fP .in +1c .TP \fB\fIGLOBUS_SEG_ERROR_TYPE_NULL \fP\fP NULL Parameter\&. .TP \fB\fIGLOBUS_SEG_ERROR_TYPE_ALREADY_SET \fP\fP Already called a one-time function\&. .TP \fB\fIGLOBUS_SEG_ERROR_TYPE_INVALID_MODULE \fP\fP Shared module missing descriptor\&. .TP \fB\fIGLOBUS_SEG_ERROR_TYPE_INVALID_FORMAT \fP\fP Invalid printf format for SEG protocol message\&. .TP \fB\fIGLOBUS_SEG_ERROR_TYPE_OUT_OF_MEMORY \fP\fP Out of memory\&. .TP \fB\fIGLOBUS_SEG_ERROR_TYPE_LOADING_MODULE \fP\fP Unable to load scheduler module\&. .SH "Function Documentation" .PP .SS "globus_result_t \fBglobus_scheduler_event\fP (const char *format, \&.\&.\&.)" .PP Send an arbitrary SEG notification\&. \fBParameters:\fP .RS 4 \fIformat\fP Printf-style format of the SEG notification message .br \fI\&.\&.\&.\fP Varargs which will be interpreted as per format\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP Scheduler message sent or queued\&. .br \fIGLOBUS_SEG_ERROR_NULL\fP Null format\&. .br \fIGLOBUS_SEG_ERROR_INVALID_FORMAT\fP Unable to determine length of formatted string\&. .RE .PP .SS "globus_result_t \fBglobus_scheduler_event_pending\fP (time_ttimestamp, const char *jobid)" .PP Send a job pending event to the JobSchedulerMonitor implementation\&. \fBParameters:\fP .RS 4 \fItimestamp\fP Timestamp to use for the event\&. If set to 0, the time which this function was called is used\&. .br \fIjobid\fP String indicating the scheduler-specific name of the job\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP Scheduler message sent or queued\&. .br \fIGLOBUS_SEG_ERROR_NULL\fP Null jobid\&. .br \fIGLOBUS_SEG_ERROR_INVALID_FORMAT\fP Unable to determine length of formatted string\&. .RE .PP .SS "globus_result_t \fBglobus_scheduler_event_active\fP (time_ttimestamp, const char *jobid)" .PP Send a job active event to the JobSchedulerMonitor implementation\&. \fBParameters:\fP .RS 4 \fItimestamp\fP Timestamp to use for the event\&. If set to 0, the time which this function was called is used\&. .br \fIjobid\fP String indicating the scheduler-specific name of the job\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP Scheduler message sent or queued\&. .br \fIGLOBUS_SEG_ERROR_NULL\fP Null jobid\&. .br \fIGLOBUS_SEG_ERROR_INVALID_FORMAT\fP Unable to determine length of formatted string\&. .RE .PP .SS "globus_result_t \fBglobus_scheduler_event_failed\fP (time_ttimestamp, const char *jobid, intfailure_code)" .PP Send a job failed event to the JobSchedulerMonitor implementation\&. \fBParameters:\fP .RS 4 \fItimestamp\fP Timestamp to use for the event\&. If set to 0, the time which this function was called is used\&. .br \fIjobid\fP String indicating the scheduler-specific name of the job\&. .br \fIfailure_code\fP Failure code of the process if known\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP Scheduler message sent or queued\&. .br \fIGLOBUS_SEG_ERROR_NULL\fP Null jobid\&. .br \fIGLOBUS_SEG_ERROR_INVALID_FORMAT\fP Unable to determine length of formatted string\&. .RE .PP .SS "globus_result_t \fBglobus_scheduler_event_done\fP (time_ttimestamp, const char *jobid, intexit_code)" .PP Send a job done event to the JobSchedulerMonitor implementation\&. \fBParameters:\fP .RS 4 \fItimestamp\fP Timestamp to use for the event\&. If set to 0, the time which this function was called is used\&. .br \fIjobid\fP String indicating the scheduler-specific name of the job\&. .br \fIexit_code\fP Exit code of the process if known\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SUCCESS\fP Scheduler message sent or queued\&. .br \fIGLOBUS_SEG_ERROR_NULL\fP Null jobid\&. .br \fIGLOBUS_SEG_ERROR_INVALID_FORMAT\fP Unable to determine length of formatted string\&. .RE .PP .SS "globus_result_t \fBglobus_scheduler_event_generator_get_timestamp\fP (time_t *timestamp)" .PP Get the timestamp for the earliest event an SEG module should send\&. \fBParameters:\fP .RS 4 \fItimestamp\fP Pointer to a time_t which will be set to the timestamp passed to the SEG executable\&. The module should not send any events which occur prior to this timestamp\&. .RE .PP \fBReturn values:\fP .RS 4 \fIGLOBUS_SEG_ERROR_NULL\fP Null timestamp\&. .br \fIGLOBUS_SUCCESS\fP Timestamp value updated\&. If the timestamp was not set on the SEG command-line, then the value pointed to by \fItimestamp\fP will be set to 0\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for globus scheduler event generator from the source code\&.