MediaWiki
1.28.0
|
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. More... | |
getCurrentPosition () | |
Get the position ID of the latest journal entry. More... | |
getPositionAtTime ($time) | |
Get the position ID of the latest journal entry at some point in time. More... | |
getTimestampedUUID () | |
Get a statistically unique ID string. More... | |
logChangeBatch (array $entries, $batchId) | |
Log changes made by a batch file operation. More... | |
purgeOldLogs () | |
Purge any old log entries. More... | |
Static Public Member Functions | |
static | factory (array $config, $backend) |
Create an appropriate FileJournal object from config. More... | |
Protected Member Functions | |
__construct (array $config) | |
Construct a new instance from configuration. More... | |
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.
|
protected |
Construct a new instance from configuration.
array | $config | Includes: 'ttlDays' : days to keep log entries around (false means "forever") |
Definition at line 51 of file FileJournal.php.
|
abstractprotected |
int | $start | |
int | $limit |
Referenced by getChangeEntries().
|
abstractprotected |
|
abstractprotected |
int | string | $time | Timestamp |
Referenced by getPositionAtTime().
|
abstractprotected |
array | $entries | List of file operations (each an array of parameters) |
string | $batchId | UUID string that identifies the operation batch |
Referenced by logChangeBatch().
|
abstractprotected |
|
staticfinal |
Create an appropriate FileJournal object from config.
array | $config | |
string | $backend | A registered file backend name |
Exception |
Definition at line 63 of file FileJournal.php.
References $backend.
Referenced by FileBackend\__construct(), FileBackendGroup\config(), and FileBackendTest\setUp().
|
final |
Get an array of file change log entries.
A starting change ID and/or limit can be specified.
int | $start | Starting change ID or null |
int | $limit | Maximum number of items to return |
string | &$next | Updated to the ID of the next entry. |
Definition at line 166 of file FileJournal.php.
References $last, $limit, and doGetChangeEntries().
|
final |
Get the position ID of the latest journal entry.
Definition at line 122 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 138 of file FileJournal.php.
References $time, and doGetPositionAtTime().
|
final |
Get a statistically unique ID string.
Definition at line 79 of file FileJournal.php.
References $s, TS_MW, and wfTimestamp().
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 100 of file FileJournal.php.
References doLogChangeBatch(), and StatusValue\newGood().
Referenced by FileOpBatch\attempt().
|
final |
Purge any old log entries.
Definition at line 191 of file FileJournal.php.
References doPurgeOldLogs().
Referenced by DBFileJournal\doLogChangeBatch().
|
protected |
Definition at line 40 of file FileJournal.php.
Referenced by DBFileJournal\doLogChangeBatch(), and factory().
|
protected |
Definition at line 43 of file FileJournal.php.