|
ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
|
Inheritance diagram for ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence:
Collaboration diagram for ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence:Public Member Functions | |
| __construct (protected \ilDBInterface $db) | |
| setConnector (\arConnector $c) | |
| saveBucketAndItsTasks (Bucket $bucket) | |
| Fully updates or creates an Observer and all its tasks into the database. More... | |
| updateBucket (Bucket $bucket) | |
| Updates only the bucket! Use this if e.g. More... | |
| getBucketIdsOfUser (int $user_id, string $order_by="id", string $order_direction="ASC") | |
| |
| getBucketMetaOfUser (int $user_id) | |
| getBucketIdsByState (int $state) | |
| |
| getBucketContainerId (Bucket $bucket) | |
| deleteBucket (Bucket $bucket) | |
| Delete the bucket and all its stuff. More... | |
| loadBuckets (array $bucket_container_ids) | |
Public Member Functions inherited from ILIAS\BackgroundTasks\Persistence | |
| saveBucketAndItsTasks (Bucket $bucket) | |
| getBucketIdsOfUser (int $user_id, string $order_by="id", string $order_direction="ASC") | |
| getBucketIdsByState (int $state) | |
| loadBucket (int $bucket_container_id) | |
| loadBuckets (array $bucket_container_ids) | |
| deleteBucketById (int $bucket_id) | |
| Deletes the Observer AND all its tasks and values. More... | |
| deleteBucket (Bucket $bucket) | |
| Delete the bucket and all its stuff. More... | |
| updateBucket (Bucket $bucket) | |
| Updates only the bucket! Use this if e.g. More... | |
| getBucketContainerId (Bucket $bucket) | |
| getBucketMetaOfUser (int $user_id) | |
Static Public Member Functions | |
| static | instance (\ilDBInterface $db) |
Protected Member Functions | |
| gc () | |
| saveObserver (Bucket $bucket) | |
| saveTask (Task $task, int $bucketId) | |
| saveValue (Value $value, int $bucketId, int $position) | |
| getTaskContainerId (Task $task) | |
| getValueContainerId (Value $value) | |
Protected Attributes | |
| SplObjectStorage | $bucketHashToObserverContainerId |
| SplObjectStorage | $taskHashToTaskContainerId |
| SplObjectStorage | $valueHashToValueContainerId |
| arConnector | $connector = null |
Static Protected Attributes | |
| static BasicPersistence | $instance |
| static array | $buckets = [] |
| static array | $tasks = [] |
Definition at line 32 of file BasicPersistence.php.
| ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence::__construct | ( | protected \ilDBInterface | $db | ) |
Definition at line 51 of file BasicPersistence.php.
| ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence::deleteBucket | ( | Bucket | $bucket | ) |
Delete the bucket and all its stuff.
Implements ILIAS\BackgroundTasks\Persistence.
Definition at line 497 of file BasicPersistence.php.
References $id, ILIAS\BackgroundTasks\Persistence\deleteBucketById(), and ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketContainerId().
Here is the call graph for this function:
|
protected |
Definition at line 58 of file BasicPersistence.php.
References ILIAS\$db, ANONYMOUS_USER_ID, ILIAS\BackgroundTasks\Implementation\Bucket\State\FINISHED, and ILIAS\BackgroundTasks\Implementation\Bucket\State\USER_INTERACTION.
Referenced by ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketIdsOfUser().
Here is the caller graph for this function:| ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence::getBucketContainerId | ( | Bucket | $bucket | ) |
| SerializationException |
Implements ILIAS\BackgroundTasks\Persistence.
Definition at line 342 of file BasicPersistence.php.
Referenced by ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\deleteBucket(), and ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\updateBucket().
Here is the caller graph for this function:| ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence::getBucketIdsByState | ( | int | $state | ) |
Implements ILIAS\BackgroundTasks\Persistence.
Definition at line 193 of file BasicPersistence.php.
References ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\$buckets, ILIAS\BackgroundTasks\Implementation\Persistence\BucketContainer\getId(), and ActiveRecord\where().
Here is the call graph for this function:| ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence::getBucketIdsOfUser | ( | int | $user_id, |
| string | $order_by = "id", |
||
| string | $order_direction = "ASC" |
||
| ) |
Implements ILIAS\BackgroundTasks\Persistence.
Definition at line 156 of file BasicPersistence.php.
References ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\gc(), and ActiveRecord\where().
Here is the call graph for this function:| ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence::getBucketMetaOfUser | ( | int | $user_id | ) |
Implements ILIAS\BackgroundTasks\Persistence.
Definition at line 173 of file BasicPersistence.php.
References ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\$buckets, $user_id, ILIAS\BackgroundTasks\Implementation\Persistence\BucketContainer\getDescription(), ILIAS\BackgroundTasks\Implementation\Persistence\BucketContainer\getPercentage(), ILIAS\BackgroundTasks\Implementation\Persistence\BucketContainer\getState(), ILIAS\BackgroundTasks\Implementation\Persistence\BucketContainer\getTitle(), ILIAS\BackgroundTasks\Implementation\Persistence\BucketContainer\getUserId(), and ActiveRecord\where().
Here is the call graph for this function:
|
protected |
| $task | Task |
| SerializationException |
Definition at line 356 of file BasicPersistence.php.
Referenced by ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveObserver(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveValue(), and ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\updateBucket().
Here is the caller graph for this function:
|
protected |
| SerializationException |
Definition at line 369 of file BasicPersistence.php.
|
static |
Definition at line 42 of file BasicPersistence.php.
References ILIAS\$db, and ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\$instance.
Referenced by BackgroundTasks\Implementation\Observer\BasicObserverTest\testCheckIntegrity().
Here is the caller graph for this function:| ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence::loadBuckets | ( | array | $bucket_container_ids | ) |
Implements ILIAS\BackgroundTasks\Persistence.
Definition at line 507 of file BasicPersistence.php.
References ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\$buckets, ILIAS\BackgroundTasks\Persistence\deleteBucketById(), and ILIAS\BackgroundTasks\Persistence\loadBucket().
Here is the call graph for this function:| ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence::saveBucketAndItsTasks | ( | Bucket | $bucket | ) |
Fully updates or creates an Observer and all its tasks into the database.
| Bucket | $bucket | The bucket you want to save. |
Implements ILIAS\BackgroundTasks\Persistence.
Definition at line 124 of file BasicPersistence.php.
References ILIAS\BackgroundTasks\Bucket\checkIntegrity(), and ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveObserver().
Here is the call graph for this function:
|
protected |
Definition at line 204 of file BasicPersistence.php.
References ILIAS\BackgroundTasks\Bucket\getCurrentTask(), ILIAS\BackgroundTasks\Bucket\getDescription(), ILIAS\BackgroundTasks\Bucket\getOverallPercentage(), ILIAS\BackgroundTasks\Bucket\getState(), ILIAS\BackgroundTasks\Bucket\getTask(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getTaskContainerId(), ILIAS\BackgroundTasks\Bucket\getTitle(), ILIAS\BackgroundTasks\Bucket\getUserId(), ILIAS\BackgroundTasks\Bucket\hasCurrentTask(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveTask(), and ILIAS\BackgroundTasks\Bucket\setCurrentTask().
Referenced by ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveBucketAndItsTasks().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
| Task | $task | The task to save. |
| int | $bucketId | The bucket id is needed as we want some control over what task belongs to what batch. This will recursivly save a task. |
Definition at line 245 of file BasicPersistence.php.
References ILIAS\BackgroundTasks\Task\getInput(), ILIAS\BackgroundTasks\Task\getType(), and ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveValue().
Referenced by ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveObserver(), and ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveValue().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
| Value | $value | The value |
| int | $bucketId | The bucket id, we need it to have an overview of all values belonging to a batch. Stores the value recursively. |
Definition at line 308 of file BasicPersistence.php.
References ILIAS\BackgroundTasks\Value\getHash(), ILIAS\BackgroundTasks\Value\getParentTask(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getTaskContainerId(), ILIAS\BackgroundTasks\Value\getType(), ILIAS\BackgroundTasks\Value\hasParentTask(), and ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveTask().
Referenced by ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\saveTask().
Here is the call graph for this function:
Here is the caller graph for this function:| ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence::setConnector | ( | \arConnector | $c | ) |
Definition at line 115 of file BasicPersistence.php.
References $c.
| ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence::updateBucket | ( | Bucket | $bucket | ) |
Updates only the bucket! Use this if e.g.
the percentage or the current task changes.
Implements ILIAS\BackgroundTasks\Persistence.
Definition at line 134 of file BasicPersistence.php.
References ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketContainerId(), ILIAS\BackgroundTasks\Bucket\getCurrentTask(), ILIAS\BackgroundTasks\Bucket\getDescription(), ILIAS\BackgroundTasks\Bucket\getLastHeartbeat(), ILIAS\BackgroundTasks\Bucket\getOverallPercentage(), ILIAS\BackgroundTasks\Bucket\getState(), ILIAS\BackgroundTasks\Bucket\getTask(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getTaskContainerId(), ILIAS\BackgroundTasks\Bucket\getTitle(), and ILIAS\BackgroundTasks\Bucket\getUserId().
Here is the call graph for this function:
|
protected |
Definition at line 36 of file BasicPersistence.php.
|
staticprotected |
Definition at line 35 of file BasicPersistence.php.
Referenced by ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketIdsByState(), ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\getBucketMetaOfUser(), and ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\loadBuckets().
|
protected |
Definition at line 39 of file BasicPersistence.php.
|
staticprotected |
Definition at line 34 of file BasicPersistence.php.
Referenced by ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence\instance().
|
protected |
Definition at line 37 of file BasicPersistence.php.
|
staticprotected |
Definition at line 40 of file BasicPersistence.php.
|
protected |
Definition at line 38 of file BasicPersistence.php.