MediaWiki fundraising/REL1_35
|
Class for handling file operation journaling. More...
Public Member Functions | |
__construct (array $config) | |
Construct a new instance from configuration. | |
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 | |
doGetChangeEntries ( $start, $limit) | |
doGetCurrentPosition () | |
doGetPositionAtTime ( $time) | |
doLogChangeBatch (array $entries, $batchId) | |
doPurgeOldLogs () | |
Protected Attributes | |
string | $backend |
int false | $ttlDays |
Class for handling file operation journaling.
Subclasses should avoid throwing exceptions at all costs.
Stable to extend
Definition at line 41 of file FileJournal.php.
FileJournal::__construct | ( | array | $config | ) |
Construct a new instance from configuration.
Stable to call
array | $config | Includes:
|
Reimplemented in DBFileJournal.
Definition at line 55 of file FileJournal.php.
|
abstractprotected |
int | $start | |
int | $limit |
Reimplemented in DBFileJournal, and NullFileJournal.
Referenced by getChangeEntries().
|
abstractprotected |
Reimplemented in DBFileJournal, and NullFileJournal.
Referenced by getCurrentPosition().
|
abstractprotected |
int | string | $time | Timestamp |
Reimplemented in DBFileJournal, and NullFileJournal.
Referenced by getPositionAtTime().
|
abstractprotected |
array | $entries | List of file operations (each an array of parameters) |
string | $batchId | UUID string that identifies the operation batch |
Reimplemented in DBFileJournal, and NullFileJournal.
Referenced by logChangeBatch().
|
abstractprotected |
Reimplemented in DBFileJournal, and NullFileJournal.
Referenced by purgeOldLogs().
|
staticfinal |
Create an appropriate FileJournal object from config.
array | $config | |
string | $backend | A registered file backend name |
Exception |
Definition at line 69 of file FileJournal.php.
References $backend, and wfDeprecated().
|
final |
Get an array of file change log entries.
A starting change ID and/or limit can be specified.
int | null | $start | Starting change ID or null |
int | $limit | Maximum number of items to return (0 = unlimited) |
string | null | &$next | Updated to the ID of the next entry. |
Definition at line 175 of file FileJournal.php.
References doGetChangeEntries().
|
final |
Get the position ID of the latest journal entry.
Definition at line 130 of file FileJournal.php.
References doGetCurrentPosition().
|
final |
Get the position ID of the latest journal entry at some point in time.
int | string | $time | Timestamp |
Definition at line 146 of file FileJournal.php.
References doGetPositionAtTime().
|
final |
Get a statistically unique ID string.
Definition at line 85 of file FileJournal.php.
References $s.
Referenced by FileOpBatch\attempt().
|
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 108 of file FileJournal.php.
References doLogChangeBatch().
Referenced by FileOpBatch\attempt().
|
final |
Purge any old log entries.
Definition at line 201 of file FileJournal.php.
References doPurgeOldLogs().
Referenced by DBFileJournal\doLogChangeBatch().
|
protected |
Definition at line 43 of file FileJournal.php.
Referenced by DBFileJournal\doLogChangeBatch(), and factory().
|
protected |
Definition at line 45 of file FileJournal.php.