MediaWiki
REL1_20
|
Proxy backend that mirrors writes to several internal backends. More...
Public Member Functions | |
__construct (array $config) | |
Construct a proxy backend that consists of several internal backends. | |
accessibilityCheck (array $paths) | |
Check that a set of file paths are usable across all internal backends. | |
clearCache (array $paths=null) | |
concatenate (array $params) | |
consistencyCheck (array $paths) | |
Check that a set of files are consistent across all internal backends. | |
directoryExists (array $params) | |
fileExists (array $params) | |
getDirectoryList (array $params) | |
getFileContents (array $params) | |
getFileList (array $params) | |
getFileProps (array $params) | |
getFileSha1Base36 (array $params) | |
getFileSize (array $params) | |
getFileStat (array $params) | |
getFileTimestamp (array $params) | |
getLocalCopy (array $params) | |
getLocalReference (array $params) | |
getScopedLocksForOps (array $ops, Status $status) | |
resyncFiles (array $paths) | |
Check that a set of files are consistent across all internal backends and re-synchronize those files againt the "multi master" if needed. | |
streamFile (array $params) | |
Public Attributes | |
const | CHECK_SHA1 = 4 |
const | CHECK_SIZE = 1 |
const | CHECK_TIME = 2 |
Protected Member Functions | |
doClean (array $params) | |
doOperationsInternal (array $ops, array $opts) | |
doPrepare (array $params) | |
doPublish (array $params) | |
doQuickOperationsInternal (array $ops) | |
doSecure (array $params) | |
fileStoragePathsForOps (array $ops) | |
Get a list of file storage paths to read or write for a list of operations. | |
replicateContainerDirChanges ($path) | |
substOpBatchPaths (array $ops, FileBackendStore $backend) | |
Substitute the backend name in storage path parameters for a set of operations with that of a given internal backend. | |
substOpPaths (array $ops, FileBackendStore $backend) | |
Same as substOpBatchPaths() but for a single operation. | |
substPaths ($paths, FileBackendStore $backend) | |
Substitute the backend of storage paths with an internal backend's name. | |
unsubstPaths ($paths) | |
Substitute the backend of internal storage paths with the proxy backend's name. | |
Protected Attributes | |
$autoResync = false | |
Array | $backends = array() |
Prioritized list of FileBackendStore objects *. | |
$masterIndex = -1 | |
Array | $noPushDirConts = array() |
* | |
$noPushQuickOps = false | |
$syncChecks = 0 |
Proxy backend that mirrors writes to several internal backends.
This class defines a multi-write backend. Multiple backends can be registered to this proxy backend and it will act as a single backend. Use this when all access to those backends is through this proxy backend. At least one of the backends must be declared the "master" backend.
Only use this class when transitioning from one storage system to another.
Read operations are only done on the 'master' backend for consistency. Write operations are performed on all backends, in the order defined. If an operation fails on one backend it will be rolled back from the others.
Definition at line 42 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::__construct | ( | array $ | config | ) |
Construct a proxy backend that consists of several internal backends.
Locking, journaling, and read-only checks are handled by the proxy backend.
Additional $config params include:
$config | Array |
MWException |
Reimplemented from FileBackend.
Definition at line 82 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::accessibilityCheck | ( | array $ | paths | ) |
Check that a set of file paths are usable across all internal backends.
$paths | Array List of storage paths |
Definition at line 273 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::clearCache | ( | array $ | paths = null | ) |
Reimplemented from FileBackend.
Definition at line 665 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::concatenate | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 527 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::consistencyCheck | ( | array $ | paths | ) |
Check that a set of files are consistent across all internal backends.
$paths | Array List of storage paths |
Definition at line 207 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::directoryExists | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 637 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::doClean | ( | array $ | params | ) | [protected] |
$params | array |
Reimplemented from FileBackend.
Definition at line 510 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::doOperationsInternal | ( | array $ | ops, |
array $ | opts | ||
) | [final, protected] |
Reimplemented from FileBackend.
Definition at line 136 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::doPrepare | ( | array $ | params | ) | [protected] |
Reimplemented from FileBackend.
Definition at line 459 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::doPublish | ( | array $ | params | ) | [protected] |
$params | array |
Reimplemented from FileBackend.
Definition at line 493 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::doQuickOperationsInternal | ( | array $ | ops | ) | [protected] |
Reimplemented from FileBackend.
Definition at line 422 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::doSecure | ( | array $ | params | ) | [protected] |
$params | array |
Reimplemented from FileBackend.
Definition at line 476 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::fileExists | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 537 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::fileStoragePathsForOps | ( | array $ | ops | ) | [protected] |
Get a list of file storage paths to read or write for a list of operations.
$ops | Array Same format as doOperations() |
Definition at line 339 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getDirectoryList | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 647 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileContents | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 577 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileList | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 657 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileProps | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 597 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileSha1Base36 | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 587 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileSize | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 557 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileStat | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 567 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileTimestamp | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 547 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getLocalCopy | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 627 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getLocalReference | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 617 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getScopedLocksForOps | ( | array $ | ops, |
Status $ | status | ||
) |
Reimplemented from FileBackend.
Definition at line 675 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::replicateContainerDirChanges | ( | $ | path | ) | [protected] |
$path | string Storage path |
Definition at line 450 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::resyncFiles | ( | array $ | paths | ) |
Check that a set of files are consistent across all internal backends and re-synchronize those files againt the "multi master" if needed.
$paths | Array List of storage paths |
Definition at line 298 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::streamFile | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 607 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::substOpBatchPaths | ( | array $ | ops, |
FileBackendStore $ | backend | ||
) | [protected] |
Substitute the backend name in storage path parameters for a set of operations with that of a given internal backend.
$ops | Array List of file operation arrays |
$backend | FileBackendStore |
Definition at line 363 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::substOpPaths | ( | array $ | ops, |
FileBackendStore $ | backend | ||
) | [protected] |
Same as substOpBatchPaths() but for a single operation.
$ops | array File operation array |
$backend | FileBackendStore |
Definition at line 384 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::substPaths | ( | $ | paths, |
FileBackendStore $ | backend | ||
) | [protected] |
Substitute the backend of storage paths with an internal backend's name.
$paths | Array|string List of paths or single string path |
$backend | FileBackendStore |
Definition at line 396 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::unsubstPaths | ( | $ | paths | ) | [protected] |
Substitute the backend of internal storage paths with the proxy backend's name.
$paths | Array|string List of paths or single string path |
Definition at line 410 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::$autoResync = false [protected] |
Definition at line 46 of file FileBackendMultiWrite.php.
Array FileBackendMultiWrite::$backends = array() [protected] |
Prioritized list of FileBackendStore objects *.
Definition at line 43 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::$masterIndex = -1 [protected] |
Definition at line 44 of file FileBackendMultiWrite.php.
Array FileBackendMultiWrite::$noPushDirConts = array() [protected] |
*
Definition at line 48 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::$noPushQuickOps = false [protected] |
Definition at line 49 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::$syncChecks = 0 [protected] |
Definition at line 45 of file FileBackendMultiWrite.php.
const FileBackendMultiWrite::CHECK_SHA1 = 4 |
Definition at line 54 of file FileBackendMultiWrite.php.
const FileBackendMultiWrite::CHECK_SIZE = 1 |
Definition at line 52 of file FileBackendMultiWrite.php.
const FileBackendMultiWrite::CHECK_TIME = 2 |
Definition at line 53 of file FileBackendMultiWrite.php.