See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]
Adhoc task abstract class. All background tasks should extend this class.
Copyright: | 2013 Damyon Wiese |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 174 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
adhoc_task:: (13 methods):
get_name()
set_id()
get_userid()
set_custom_data()
set_custom_data_as_string()
get_custom_data()
get_custom_data_as_string()
get_id()
set_userid()
get_default_concurrency_limit()
get_concurrency_limit()
set_concurrency_lock()
release_concurrency_lock()
Class: adhoc_task - X-Ref
Abstract class defining an adhoc task.get_name() X-Ref |
Provide default implementation of the task name for backward compatibility. Extending classes are expected to implement this method to provide a descriptive name for the task (shown to admins) return: string |
set_id($id) X-Ref |
Setter for $id. param: int|null $id |
get_userid() X-Ref |
Getter for $userid. return: int|null $userid |
set_custom_data($customdata) X-Ref |
Setter for $customdata. param: mixed $customdata (anything that can be handled by json_encode) |
set_custom_data_as_string($customdata) X-Ref |
Alternate setter for $customdata. Expects the data as a json_encoded string. param: string $customdata json_encoded string |
get_custom_data() X-Ref |
Getter for $customdata. return: mixed (anything that can be handled by json_decode). |
get_custom_data_as_string() X-Ref |
Alternate getter for $customdata. return: string this is the raw json encoded version. |
get_id() X-Ref |
Getter for $id. return: int|null $id |
set_userid($userid) X-Ref |
Setter for $userid. param: int|null $userid |
get_default_concurrency_limit() X-Ref |
Returns default concurrency limit for this task. return: int default concurrency limit |
get_concurrency_limit() X-Ref |
Returns effective concurrency limit for this task. return: int effective concurrency limit for this task |
set_concurrency_lock(\core\lock\lock $lock) X-Ref |
Sets concurrency task lock. param: \core\lock\lock $lock concurrency lock to be set |
release_concurrency_lock() X-Ref |
Release the concurrency lock for this task type. |