MediaWiki
REL1_21
|
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) | |
getFileContentsMulti (array $params) | |
getFileHttpUrl (array $params) | |
getFileList (array $params) | |
getFileProps (array $params) | |
getFileSha1Base36 (array $params) | |
getFileSize (array $params) | |
getFileStat (array $params) | |
getFileTimestamp (array $params) | |
getLocalCopyMulti (array $params) | |
getLocalReferenceMulti (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.
array | $paths | List of storage paths |
Definition at line 274 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::clearCache | ( | array $ | paths = null | ) |
Reimplemented from FileBackend.
Definition at line 700 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::concatenate | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 534 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::consistencyCheck | ( | array $ | paths | ) |
Check that a set of files are consistent across all internal backends.
array | $paths | List of storage paths |
Definition at line 208 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::directoryExists | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 672 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::doClean | ( | array $ | params | ) | [protected] |
$params | array |
Reimplemented from FileBackend.
Definition at line 517 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 466 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::doPublish | ( | array $ | params | ) | [protected] |
$params | array |
Reimplemented from FileBackend.
Definition at line 500 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::doQuickOperationsInternal | ( | array $ | ops | ) | [protected] |
Reimplemented from FileBackend.
Definition at line 429 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::doSecure | ( | array $ | params | ) | [protected] |
$params | array |
Reimplemented from FileBackend.
Definition at line 483 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::fileExists | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 545 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.
array | $ops | Same format as doOperations() |
Definition at line 340 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getDirectoryList | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 682 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileContentsMulti | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 585 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileHttpUrl | ( | array $ | params | ) |
Reimplemented from FileBackend.
Definition at line 662 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileList | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 692 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileProps | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 611 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileSha1Base36 | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 601 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileSize | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 565 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileStat | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 575 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getFileTimestamp | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 555 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getLocalCopyMulti | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 647 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getLocalReferenceMulti | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 631 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::getScopedLocksForOps | ( | array $ | ops, |
Status $ | status | ||
) |
Reimplemented from FileBackend.
Definition at line 710 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::replicateContainerDirChanges | ( | $ | path | ) | [protected] |
string | $path | Storage path |
Definition at line 457 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.
array | $paths | List of storage paths |
Definition at line 299 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::streamFile | ( | array $ | params | ) |
$params | array |
Reimplemented from FileBackend.
Definition at line 621 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.
array | $ops | List of file operation arrays |
$backend | FileBackendStore |
Definition at line 370 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::substOpPaths | ( | array $ | ops, |
FileBackendStore $ | backend | ||
) | [protected] |
Same as substOpBatchPaths() but for a single operation.
array | $ops | File operation array |
$backend | FileBackendStore |
Definition at line 391 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::substPaths | ( | $ | paths, |
FileBackendStore $ | backend | ||
) | [protected] |
Substitute the backend of storage paths with an internal backend's name.
array | string | $paths | List of paths or single string path |
$backend | FileBackendStore |
Definition at line 403 of file FileBackendMultiWrite.php.
FileBackendMultiWrite::unsubstPaths | ( | $ | paths | ) | [protected] |
Substitute the backend of internal storage paths with the proxy backend's name.
array | string | $paths | List of paths or single string path |
Definition at line 417 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.