This datatype is used by the Apache HTTPD server to be the Grassroots JobsManager. More...

#include <mod_grassroots_config.h>

Inheritance diagram for APRJobsManager:
[legend]
Collaboration diagram for APRJobsManager:
[legend]

Public Member Functions

APRJobsManagerInitAPRJobsManager (server_rec *server_p, apr_pool_t *pool_p, const char *provider_name_s)
 Get the JobsManager to use in the Grassroots module. More...
 
bool APRJobsManagerChildInit (apr_pool_t *pool_p, server_rec *server_p)
 Adjust an APRJobsManager for when an httpd child process is started. More...
 
apr_status_t CleanUpAPRJobsManager (void *value_p)
 Release any resources that an APRJobsManager. More...
 
bool PostConfigAPRJobsManager (APRJobsManager *manager_p, apr_pool_t *config_pool_p, server_rec *server_p, const char *provider_name_s)
 Configure an APRJobsManager in the Apache parent process before any child processes are launched. More...
 
bool APRJobsManagerPreConfigure (APRJobsManager *manager_p, apr_pool_t *config_pool_p)
 Set up an APRJobsManager prior to the configuration details being used. More...
 
void APRServiceJobFinished (JobsManager *jobs_manager_p, uuid_t job_key)
 Notify that a ServiceJob with a given UUID has finished and can be removed from the given JobsManager. More...
 
bool DestroyAPRJobsManager (APRJobsManager *jobs_manager_p)
 Free an APRJobsManager. More...
 
- Public Member Functions inherited from JobsManager
JobsManagerGetJobsManager (void)
 Get the current Server-wide JobsManager. More...
 
void InitJobsManager (JobsManager *manager_p, bool(*add_job_fn)(JobsManager *manager_p, uuid_t job_key, ServiceJob *job_p), ServiceJob *(*get_job_fn)(JobsManager *manager_p, const uuid_t key), ServiceJob *(*remove_job_fn)(JobsManager *manager_p, const uuid_t key, bool get_job_flag), LinkedList *(*get_all_jobs_fn)(struct JobsManager *manager_p), bool(*delete_manager_fn)(struct JobsManager *manager_p))
 Initialise a JobsManager. More...
 
bool FreeJobsManager (JobsManager *manager_p)
 Free a JobsManager. More...
 
bool AddServiceJobToJobsManager (JobsManager *manager_p, uuid_t job_key, ServiceJob *job_p)
 Add a ServiceJob to the JobsManager. More...
 
ServiceJobGetServiceJobFromJobsManager (JobsManager *manager_p, const uuid_t key)
 Find a ServiceJob. More...
 
ServiceJobRemoveServiceJobFromJobsManager (JobsManager *manager_p, const uuid_t key, bool get_job_flag)
 Remove a ServiceJob. More...
 
LinkedListGetAllServiceJobsFromJobsManager (struct JobsManager *manager_p)
 Get all ServiceJobs. More...
 
JobsManagerLoadJobsManager (const char *jobs_manager_s)
 Load and create a JobsManager from the named plugin. More...
 

Data Fields

JobsManager ajm_base_manager
 The base JobsManager. More...
 
APRGlobalStorageajm_store_p
 The APRGlobalStorage implementation where the ServiceJobs will be stored. More...
 
- Data Fields inherited from JobsManager
Pluginjm_plugin_p
 The plugin that thjis JobsManager was loaded from. More...
 
bool(* jm_add_job_fn )(struct JobsManager *manager_p, uuid_t job_key, ServiceJob *job_p)
 Add a ServiceJob to the JobsManager. More...
 
ServiceJob *(* jm_get_job_fn )(struct JobsManager *manager_p, const uuid_t key)
 Find a ServiceJob. More...
 
ServiceJob *(* jm_remove_job_fn )(struct JobsManager *manager_p, const uuid_t key, bool get_job_flag)
 Remove a ServiceJob. More...
 
LinkedList *(* jm_get_all_jobs_fn )(struct JobsManager *manager_p)
 Get all ServiceJobs. More...
 
bool(* jm_delete_manager_fn )(struct JobsManager *manager_p)
 The function to use to delete this JobsManager,. More...
 

Detailed Description

This datatype is used by the Apache HTTPD server to be the Grassroots JobsManager.

Member Function Documentation

◆ InitAPRJobsManager()

APRJobsManager * InitAPRJobsManager ( server_rec *  server_p,
apr_pool_t *  pool_p,
const char *  provider_name_s 
)

Get the JobsManager to use in the Grassroots module.

Parameters
server_pThe httpd server that the module is running on.
pool_pThe memory pool to use for any allocations that the APRJobsManagre might need.
provider_name_sThe cache provider to use.
Returns
A newly-allocated APRJobsManager or NULL upon error.

◆ APRJobsManagerChildInit()

bool APRJobsManagerChildInit ( apr_pool_t *  pool_p,
server_rec *  server_p 
)

Adjust an APRJobsManager for when an httpd child process is started.

When an httpd process is forked at startup, this routine sets up the necessary configuration details.

Parameters
server_pThe httpd server that the module is running on.
pool_pThe memory pool to use for any allocations that the APRJobsManager might need.
Returns
true if the APRJobsManager is adjusted correctly, false upon error.

◆ CleanUpAPRJobsManager()

apr_status_t CleanUpAPRJobsManager ( void *  value_p)

Release any resources that an APRJobsManager.

This release any resources that an APRJobsManager might have just prior to the Apache httpd server shutting down.

Parameters
value_pA pointer to the APRJobsManager to clean up.
Returns
AP_SUCCESS if successful, or an error code if there was a problem.

◆ PostConfigAPRJobsManager()

bool PostConfigAPRJobsManager ( APRJobsManager manager_p,
apr_pool_t *  config_pool_p,
server_rec *  server_p,
const char *  provider_name_s 
)

Configure an APRJobsManager in the Apache parent process before any child processes are launched.

Parameters
manager_pThe APRJobsManager to configure.
config_pool_pThe memory pool available to use.
server_pThe Apache server structure.
provider_name_sThe name of sharded object cache provider to use.
Returns
true if successful or false if there was a problem.

◆ APRJobsManagerPreConfigure()

bool APRJobsManagerPreConfigure ( APRJobsManager manager_p,
apr_pool_t *  config_pool_p 
)

Set up an APRJobsManager prior to the configuration details being used.

Parameters
manager_pThe APRJobsManager to initialise.
config_pool_pA memory pool to use if needed.
Returns
true if the initialisation was successful or false if there was a problem.

◆ APRServiceJobFinished()

void APRServiceJobFinished ( JobsManager jobs_manager_p,
uuid_t  job_key 
)

Notify that a ServiceJob with a given UUID has finished and can be removed from the given JobsManager.

Parameters
jobs_manager_pThe JobsManager to remove the ServiceJob from.
job_keyThe UUID of the ServiceJob to be removed.

◆ DestroyAPRJobsManager()

bool DestroyAPRJobsManager ( APRJobsManager jobs_manager_p)

Free an APRJobsManager.

Parameters
jobs_manager_pThe APRJobsManager to free.
Returns
true if the APRJobsManager was freed successfully, , false upon error.

Field Documentation

◆ ajm_base_manager

JobsManager ajm_base_manager

The base JobsManager.

◆ ajm_store_p

APRGlobalStorage* ajm_store_p

The APRGlobalStorage implementation where the ServiceJobs will be stored.


The documentation for this struct was generated from the following files: