[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/filebackend/ -> FileBackendMultiWrite.php (summary)

Proxy backend that mirrors writes to several internal backends. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Author: Aaron Schulz
File Size: 689 lines (26 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

FileBackendMultiWrite:: (37 methods):
  __construct()
  doOperationsInternal()
  consistencyCheck()
  accessibilityCheck()
  resyncFiles()
  fileStoragePathsForOps()
  substOpBatchPaths()
  substOpPaths()
  substPaths()
  unsubstPaths()
  doQuickOperationsInternal()
  replicateContainerDirChanges()
  doPrepare()
  doSecure()
  doPublish()
  doClean()
  concatenate()
  fileExists()
  getFileTimestamp()
  getFileSize()
  getFileStat()
  getFileXAttributes()
  getFileContentsMulti()
  getFileSha1Base36()
  getFileProps()
  streamFile()
  getLocalReferenceMulti()
  getLocalCopyMulti()
  getFileHttpUrl()
  directoryExists()
  getDirectoryList()
  getFileList()
  getFeatures()
  clearCache()
  preloadCache()
  preloadFileStat()
  getScopedLocksForOps()


Class: FileBackendMultiWrite  - X-Ref


__construct( array $config )   X-Ref
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:
- backends       : Array of backend config and multi-backend settings.
Each value is the config used in the constructor of a
FileBackendStore class, but with these additional settings:
- class         : The name of the backend class
- isMultiMaster : This must be set for one backend.
- template:     : If given a backend name, this will use
the config of that backend as a template.
Values specified here take precedence.
- syncChecks     : Integer bitfield of internal backend sync checks to perform.
Possible bits include the FileBackendMultiWrite::CHECK_* constants.
There are constants for SIZE, TIME, and SHA1.
The checks are done before allowing any file operations.
- autoResync     : Automatically resync the clone backends to the master backend
when pre-operation sync checks fail. This should only be used
if the master backend is stable and not missing any files.
Use "conservative" to limit resyncing to copying newer master
backend files over older (or non-existing) clone backend files.
Cases that cannot be handled will result in operation abortion.
- noPushQuickOps : (hack) Only apply doQuickOperations() to the master backend.
- noPushDirConts : (hack) Only apply directory functions to the master backend.

param: array $config

doOperationsInternal( array $ops, array $opts )   X-Ref
No description

consistencyCheck( array $paths )   X-Ref
Check that a set of files are consistent across all internal backends

param: array $paths List of storage paths
return: Status

accessibilityCheck( array $paths )   X-Ref
Check that a set of file paths are usable across all internal backends

param: array $paths List of storage paths
return: Status

resyncFiles( array $paths )   X-Ref
Check that a set of files are consistent across all internal backends
and re-synchronize those files againt the "multi master" if needed.

param: array $paths List of storage paths
return: Status

fileStoragePathsForOps( array $ops )   X-Ref
Get a list of file storage paths to read or write for a list of operations

param: array $ops Same format as doOperations()
return: array List of storage paths to files (does not include directories)

substOpBatchPaths( array $ops, FileBackendStore $backend )   X-Ref
Substitute the backend name in storage path parameters
for a set of operations with that of a given internal backend.

param: array $ops List of file operation arrays
param: FileBackendStore $backend
return: array

substOpPaths( array $ops, FileBackendStore $backend )   X-Ref
Same as substOpBatchPaths() but for a single operation

param: array $ops File operation array
param: FileBackendStore $backend
return: array

substPaths( $paths, FileBackendStore $backend )   X-Ref
Substitute the backend of storage paths with an internal backend's name

param: array|string $paths List of paths or single string path
param: FileBackendStore $backend
return: array|string

unsubstPaths( $paths )   X-Ref
Substitute the backend of internal storage paths with the proxy backend's name

param: array|string $paths List of paths or single string path
return: array|string

doQuickOperationsInternal( array $ops )   X-Ref
No description

replicateContainerDirChanges( $path )   X-Ref

param: string $path Storage path
return: bool Path container should have dir changes pushed to all backends

doPrepare( array $params )   X-Ref
No description

doSecure( array $params )   X-Ref
No description

doPublish( array $params )   X-Ref
No description

doClean( array $params )   X-Ref
No description

concatenate( array $params )   X-Ref
No description

fileExists( array $params )   X-Ref
No description

getFileTimestamp( array $params )   X-Ref
No description

getFileSize( array $params )   X-Ref
No description

getFileStat( array $params )   X-Ref
No description

getFileXAttributes( array $params )   X-Ref
No description

getFileContentsMulti( array $params )   X-Ref
No description

getFileSha1Base36( array $params )   X-Ref
No description

getFileProps( array $params )   X-Ref
No description

streamFile( array $params )   X-Ref
No description

getLocalReferenceMulti( array $params )   X-Ref
No description

getLocalCopyMulti( array $params )   X-Ref
No description

getFileHttpUrl( array $params )   X-Ref
No description

directoryExists( array $params )   X-Ref
No description

getDirectoryList( array $params )   X-Ref
No description

getFileList( array $params )   X-Ref
No description

getFeatures()   X-Ref
No description

clearCache( array $paths = null )   X-Ref
No description

preloadCache( array $paths )   X-Ref
No description

preloadFileStat( array $params )   X-Ref
No description

getScopedLocksForOps( array $ops, Status $status )   X-Ref
No description



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1