BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
FileOpBatch Class Reference

Static Public Member Functions

static attempt (array $performOps, array $opts, FileJournal $journal)

Public Attributes

const MAX_BATCH_SIZE = 1000

Detailed Description

Helper class for representing batch file operations. Do not use this class from places outside FileBackend.

Methods should avoid throwing exceptions at all costs.


Member Function Documentation

static FileOpBatch::attempt ( array  $performOps,
array  $opts,
FileJournal  $journal 

Attempt to perform a series of file operations. Callers are responsible for handling file locking.

$opts is an array of options, including:

  • force : Errors that would normally cause a rollback do not. The remaining operations are still attempted if any fail.
  • nonJournaled : Don't log this operation batch in the file journal.
  • concurrency : Try to do this many operations in parallel when possible.

The resulting Status will be "OK" unless:

  • a) unexpected operation errors occurred (network partitions, disk full...)
  • b) significant operation errors occurred and 'force' was not set
FileOp[]$performOps List of FileOp operations
array$optsBatch operation options
FileJournal$journalJournal to log operations to

The documentation for this class was generated from the following file: