MediaWiki master
|
Helper class for representing batch file operations. More...
Static Public Member Functions | |
static | attempt (array $performOps, array $opts) |
Attempt to perform a series of file operations. | |
Static Protected Member Functions | |
static | runParallelBatches (array $pPerformOps, StatusValue $status) |
Attempt a list of file operations sub-batches in series. | |
Helper class for representing batch file operations.
Do not use this class from places outside FileBackend.
Methods should avoid throwing exceptions at all costs.
Definition at line 40 of file FileOpBatch.php.
|
static |
Attempt to perform a series of file operations.
Callers are responsible for handling file locking.
$opts is an array of options, including:
The resulting StatusValue will be "OK" unless:
FileOp[] | $performOps | List of FileOp operations |
array | $opts | Batch operation options |
Definition at line 61 of file FileOpBatch.php.
References Wikimedia\FileBackend\FileOpBatch\runParallelBatches().
Referenced by Wikimedia\FileBackend\FileBackendStore\doOperationsInternal().
|
staticprotected |
Attempt a list of file operations sub-batches in series.
The operations in each sub-batch will be done in parallel. The caller is responsible for making sure the operations within any given sub-batch do not depend on each other. This will abort remaining ops on failure.
FileOp[][] | $pPerformOps | Batches of file ops (batches use original indexes) |
StatusValue | $status |
Definition at line 134 of file FileOpBatch.php.
References StatusValue\merge().
Referenced by Wikimedia\FileBackend\FileOpBatch\attempt().