|
Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
A datatype to represent a collection of ServiceJobs. More...
#include <service_job.h>
Data Fields | |
| struct Service * | sjs_service_p |
| The Service that is running these jobs. More... | |
| LinkedList * | sjs_jobs_p |
| The ServiceJobs that are in use for the Service. More... | |
A datatype to represent a collection of ServiceJobs.
| ServiceJobNode * FindServiceJobNodeInServiceJobSet | ( | const ServiceJobSet * | job_set_p, |
| const ServiceJob * | job_p | ||
| ) |
Find the ServiceJobNode for a given ServiceJob within a ServiceJobSet.
| job_set_p | The ServiceJobSet to search. |
| job_p | The ServiceJob to look for. |
NULL if it could not be found. | ServiceJobNode * FindServiceJobNodeByUUIDInServiceJobSet | ( | const ServiceJobSet * | job_set_p, |
| const uuid_t | job_id | ||
| ) |
Find the ServiceJobNode for a ServiceJob with a given uuid within a ServiceJobSet.
| job_set_p | The ServiceJobSet to search. |
| job_id | The uuid of the ServiceJob to find. |
NULL if it could not be found. | bool RemoveServiceJobByUUIDFromServiceJobSet | ( | ServiceJobSet * | job_set_p, |
| uuid_t | job_id | ||
| ) |
Remove a ServiceJob with a given uuid from a ServiceJobSet.
The ServiceJob is not deleted, it is just removed from the ServiceJobSet.
| job_set_p | The ServiceJobSet to remove the given ServiceJob from. |
| job_id | The uuid of the ServiceJob to remove. |
true if the ServiceJob was removed successfully, false otherwise.| bool RemoveServiceJobFromServiceJobSet | ( | ServiceJobSet * | job_set_p, |
| ServiceJob * | job_p | ||
| ) |
Remove a ServiceJob from a ServiceJobSet.
The ServiceJob is not deleted, it is just removed from the ServiceJobSet.
| job_set_p | The ServiceJobSet to remove the given ServiceJob from. |
| job_p | The ServiceJob to remove. |
true if the ServiceJob was removed successfully, false otherwise. | ServiceJobSet * AllocateServiceJobSet | ( | struct Service * | service_p | ) |
Allocate a ServiceJobSet.
| service_p | The Service to allocate the ServiceJobSet for. |
NULL upon error.| ServiceJobSet * AllocateSimpleServiceJobSet | ( | struct Service * | service_p, |
| const char * | job_name_s, | ||
| const char * | job_description_s | ||
| ) |
Allocate a ServiceJobSet and populate it with a single ServiceJob.
| service_p | The Service to allocate the ServiceJobSet for. |
| job_name_s | The name that will be given to the ServiceJob that will be created. |
| job_description_s | The description that will be given to the ServiceJob that will be created. This can be NULL. |
NULL upon error.| void FreeServiceJobSet | ( | ServiceJobSet * | job_set_p | ) |
Free a ServiceJobSet.
| job_set_p | The ServiceJobSet to free. |
| ServiceJob * GetServiceJobFromServiceJobSetById | ( | const ServiceJobSet * | jobs_p, |
| const uuid_t | job_id | ||
| ) |
Search a ServiceJobSet for ServiceJob.
| jobs_p | The ServiceJobSet to search. |
| job_id | The uuid_t for the ServiceJob to find. |
NULL if it could not be found. | json_t * GetServiceJobSetAsJSON | ( | const ServiceJobSet * | jobs_p, |
| bool | omit_results_flag | ||
| ) |
Get the json representation of a ServiceJobSet.
| jobs_p | The ServiceJobSet to get the representation of. |
| omit_results_flag | If this is true then just the minimal status information for the ServiceJob will be returned. If it is false then the job results will be included too if possible. |
NULL upon error. | bool ProcessServiceJobSet | ( | ServiceJobSet * | jobs_p, |
| json_t * | res_p | ||
| ) |
Process all ServiceJobs within a ServiceJobSet.
Each ServiceJob will have its status checked and updated if necessary along with setting up any LinkedServices if available.
| jobs_p | The ServiceJobSet to process. |
| res_p | The JSON array where are any results will get appended. |
true if all ServiceJobs within the ServiceJobSet were processed successfully, false otherwise. | ServiceJob * GetServiceJobFromServiceJobSet | ( | const ServiceJobSet * | jobs_p, |
| const uint32 | index | ||
| ) |
Get the ServiceJob at a particular position in a ServiceJobSet.
| jobs_p | The ServiceJobSet to get the ServiceJob from. |
| index | The index of the ServiceJob to get. |
NULL if there was an error such as if the index was out of range. | uint32 GetServiceJobSetSize | ( | const ServiceJobSet *const | jobs_p | ) |
Get the number of ServiceJobs in a ServiceJobSet.
| jobs_p | The ServiceJobSet to get size of. |
| LinkedList* sjs_jobs_p |
The ServiceJobs that are in use for the Service.