|
MediaWiki
REL1_23
|
Class for handling file operation journaling. More...


Public Member Functions | |
| getChangeEntries ($start=null, $limit=0, &$next=null) | |
| Get an array of file change log entries. | |
| getCurrentPosition () | |
| Get the position ID of the latest journal entry. | |
| getPositionAtTime ($time) | |
| Get the position ID of the latest journal entry at some point in time. | |
| getTimestampedUUID () | |
| Get a statistically unique ID string. | |
| logChangeBatch (array $entries, $batchId) | |
| Log changes made by a batch file operation. | |
| purgeOldLogs () | |
| Purge any old log entries. | |
Static Public Member Functions | |
| static | factory (array $config, $backend) |
| Create an appropriate FileJournal object from config. | |
Protected Member Functions | |
| __construct (array $config) | |
| Construct a new instance from configuration. | |
| doGetChangeEntries ($start, $limit) | |
| doGetCurrentPosition () | |
| doGetPositionAtTime ($time) | |
| doLogChangeBatch (array $entries, $batchId) | |
| doPurgeOldLogs () | |
Protected Attributes | |
| string | $backend |
| * | |
| int | $ttlDays |
| * | |
Class for handling file operation journaling.
Subclasses should avoid throwing exceptions at all costs.
Definition at line 38 of file FileJournal.php.
| FileJournal::__construct | ( | array $ | config | ) | [protected] |
Construct a new instance from configuration.
| array | $config | Includes: 'ttlDays' : days to keep log entries around (false means "forever") |
Reimplemented in DBFileJournal.
Definition at line 49 of file FileJournal.php.
| FileJournal::doGetChangeEntries | ( | $ | start, |
| $ | limit | ||
| ) | [abstract, protected] |
| int | $start | |
| int | $limit |
Reimplemented in NullFileJournal, and DBFileJournal.
| FileJournal::doGetCurrentPosition | ( | ) | [abstract, protected] |
Reimplemented in NullFileJournal, and DBFileJournal.
| FileJournal::doGetPositionAtTime | ( | $ | time | ) | [abstract, protected] |
| int | string | $time | Timestamp |
Reimplemented in NullFileJournal, and DBFileJournal.
| FileJournal::doLogChangeBatch | ( | array $ | entries, |
| $ | batchId | ||
| ) | [abstract, protected] |
| array | $entries | List of file operations (each an array of parameters) |
| string | $batchId | UUID string that identifies the operation batch |
Reimplemented in NullFileJournal, and DBFileJournal.
| FileJournal::doPurgeOldLogs | ( | ) | [abstract, protected] |
Reimplemented in NullFileJournal, and DBFileJournal.
| static FileJournal::factory | ( | array $ | config, |
| $ | backend | ||
| ) | [static, final] |
Create an appropriate FileJournal object from config.
| array | $config | |
| string | $backend | A registered file backend name |
| MWException |
Definition at line 61 of file FileJournal.php.
| FileJournal::getChangeEntries | ( | $ | start = null, |
| $ | limit = 0, |
||
| &$ | next = null |
||
| ) | [final] |
Get an array of file change log entries.
A starting change ID and/or limit can be specified.
| $start | integer Starting change ID or null |
| $limit | integer Maximum number of items to return |
| &$next | string Updated to the ID of the next entry. |
Definition at line 164 of file FileJournal.php.
| FileJournal::getCurrentPosition | ( | ) | [final] |
Get the position ID of the latest journal entry.
Definition at line 120 of file FileJournal.php.
| FileJournal::getPositionAtTime | ( | $ | time | ) | [final] |
Get the position ID of the latest journal entry at some point in time.
| int | string | $time | timestamp |
Definition at line 136 of file FileJournal.php.
| FileJournal::getTimestampedUUID | ( | ) | [final] |
Get a statistically unique ID string.
Definition at line 77 of file FileJournal.php.
Referenced by FileOpBatch\attempt().
| FileJournal::logChangeBatch | ( | array $ | entries, |
| $ | batchId | ||
| ) | [final] |
Log changes made by a batch file operation.
| array | $entries | List of file operations (each an array of parameters) which contain: op : Basic operation name (create, update, delete) path : The storage path of the file newSha1 : The final base 36 SHA-1 of the file Note that 'false' should be used as the SHA-1 for non-existing files. |
| string | $batchId | UUID string that identifies the operation batch |
Definition at line 98 of file FileJournal.php.
Referenced by FileOpBatch\attempt().
| FileJournal::purgeOldLogs | ( | ) | [final] |
string FileJournal::$backend [protected] |
*
Definition at line 39 of file FileJournal.php.
int FileJournal::$ttlDays [protected] |
*
Definition at line 41 of file FileJournal.php.