eZPublishCommunityProject(LegacyStack)  2013.5
eZDFSFileHandlerMySQLiBackend Class Reference
+ Inheritance diagram for eZDFSFileHandlerMySQLiBackend:
+ Collaboration diagram for eZDFSFileHandlerMySQLiBackend:

Public Member Functions

 __construct ()
 
 _abortCacheGeneration ($generatingFilePath)
 Aborts the cache generation process by removing the .generating file. More...
 
 _checkCacheGenerationTimeout ($generatingFilePath, $generatingFileMtime)
 Checks if generation has timed out by looking for the .generating file and comparing its timestamp to the one assigned when the file was created. More...
 
 _connect ()
 Connects to the database. More...
 
 _copy ($srcFilePath, $dstFilePath, $fname=false)
 Creates a copy of a file in DB+DFS. More...
 
 _delete ($filePath, $insideOfTransaction=false, $fname=false)
 Deletes a file from DB. More...
 
 _deleteByDirList ($dirList, $commonPath, $commonSuffix, $fname=false)
 
 _deleteByLike ($like, $fname=false)
 Deletes multiple files using a SQL LIKE statement. More...
 
 _deleteByWildcard ($wildcard, $fname=false)
 Deletes multiple DB files by wildcard. More...
 
 _disconnect ()
 Disconnects the handler from the database. More...
 
 _endCacheGeneration ($filePath, $generatingFilePath, $rename)
 Ends the cache generation for the current file: moves the (meta)data for the .generating file to the actual file, and removed the .generating. More...
 
 _exists ($filePath, $fname=false, $ignoreExpiredFiles=true, $checkOnDFS=false)
 
 _fetch ($filePath, $uniqueName=false)
 Fetches the file $filePath from the database to its own name. More...
 
 _fetchContents ($filePath, $fname=false)
 
 _fetchMetadata ($filePath, $fname=false)
 Fetches and returns metadata for $filePath. More...
 
 _getFileList ($scopes=false, $excludeScopes=false, $limit=false, $path=false)
 gets the list of cluster files, filtered by the optional params More...
 
 _insert ($table, $array, $fname)
 Performs an insert of the given items in $array. More...
 
 _linkCopy ($srcPath, $dstPath, $fname=false)
 
 _passThrough ($filePath, $startOffset=0, $length=false, $fname=false)
 Passes $filePath content through. More...
 
 _purge ($filePath, $onlyExpired=false, $expiry=false, $fname=false)
 Purges meta-data and file-data for a file entry. More...
 
 _purgeByLike ($like, $onlyExpired=false, $limit=50, $expiry=false, $fname=false)
 Purges meta-data and file-data for files matching a pattern using a SQL LIKE syntax. More...
 
 _rename ($srcFilePath, $dstFilePath)
 Renames $srcFilePath to $dstFilePath. More...
 
 _report ($query, $fname, $timeTaken, $numRows=false)
 Report SQL $query to debug system. More...
 
 _startCacheGeneration ($filePath, $generatingFilePath)
 Attempts to begin cache generation by creating a new file named as the given filepath, suffixed with .generating. More...
 
 _store ($filePath, $datatype, $scope, $fname=false)
 Stores $filePath to cluster. More...
 
 _storeContents ($filePath, $contents, $scope, $datatype, $mtime=false, $fname=false)
 Stores $contents as the contents of $filePath to the cluster. More...
 
 _storeContentsInner ($filePath, $contents, $scope, $datatype, $curTime, $fname)
 
 _storeInner ($filePath, $datatype, $scope, $fname)
 Callback function used to perform the actual file store operation. More...
 
 expiredFilesList ($scopes, $limit=array(0, 100), $expiry=false)
 Returns the list of expired files. More...
 
 registerListener (eZClusterEventListener $listener)
 Registers $listener as the cluster event listener. More...
 

Public Attributes

 $db = null
 
const TABLE_METADATA = 'ezdfsfile'
 
const TIME_UNTIL_RETRY = 100
 Wait for n microseconds until retry if copy fails, to avoid DFS overload. More...
 

Protected Member Functions

 __mkdir_p ($dir)
 
 _begin ($fname=false)
 Starts a new transaction by executing a BEGIN call. More...
 
 _commit ($fname=false)
 Stops a current transaction and commits the changes by executing a COMMIT call. More...
 
 _deleteByDirListInner ($dirList, $commonPath, $commonSuffix, $fname)
 
 _deleteByWildcardInner ($wildcard, $fname)
 Callback used by _deleteByWildcard to perform the deletion. More...
 
 _deleteInner ($filePath, $fname)
 Callback method used by by _delete to delete a single file. More...
 
 _die ($msg, $sql=null)
 Handles a DB error, displaying it as an eZDebug error. More...
 
 _error ($query, $fname, $error="Failed to execute SQL for function:")
 Prints error message $error to debug system. More...
 
 _fail ($value, $text=false)
 Creates an error object which can be read by some backend functions. More...
 
 _handleErrorType ($res)
 
 _insertUpdate ($table, $array, $update, $fname, $reportError=true)
 Performs an insert of the given items in $array. More...
 
 _isFailure ($result)
 Checks if $result is a failure type and returns true if so, false otherwise. More...
 
 _md5 ($value)
 Provides the SQL calls to convert $value to MD5 The returned value can directly be put into SQLs. More...
 
 _protect ()
 Protects a custom function with SQL queries in a database transaction. More...
 
 _query ($query, $fname=false, $reportError=true)
 Performs mysql query and returns mysql result. More...
 
 _quote ($value, $escapeUnderscoreWildcards=false)
 Make sure that $value is escaped and qouted according to type and returned as a string. More...
 
 _rollback ($fname=false)
 Stops a current transaction and discards all changes by executing a ROLLBACK call. More...
 
 _selectOne ($query, $fname, $error=false, $debug=false, $fetchCall)
 Runs a select query, applying the $fetchCall callback to one result If there are more than one row it will fail and exit, if 0 it returns false. More...
 
 _selectOneAssoc ($query, $fname, $error=false, $debug=false)
 Runs a select query and returns one associative row from the result. More...
 
 _selectOneRow ($query, $fname, $error=false, $debug=false)
 Runs a select query and returns one numeric indexed row from the result If there are more than one row it will fail and exit, if 0 it returns false. More...
 
 _sqlList ($array)
 Formats a list of entries as an SQL list which is separated by commas. More...
 
 remainingCacheGenerationTime ($row)
 Returns the remaining time, in seconds, before the generating file times out. More...
 

Static Protected Member Functions

static nameTrunk ($filePath, $scope)
 Returns the name_trunk for a file path. More...
 

Protected Attributes

 $dfsbackend = null
 
 $eventHandler
 
 $maxCopyTries
 
 $numQueries = 0
 
 $transactionCount = 0
 

Static Protected Attributes

static $dbparams = null
 

Private Member Functions

 _copyInner ($srcFilePath, $dstFilePath, $fname, $metaData)
 Inner function used by _copy to perform the operation in a transaction. More...
 
 _deleteByLikeInner ($like, $fname)
 Callback used by _deleteByLike to perform the deletion. More...
 

Constructor & Destructor Documentation

eZDFSFileHandlerMySQLiBackend::__construct ( )

Member Function Documentation

eZDFSFileHandlerMySQLiBackend::__mkdir_p (   $dir)
protected

Referenced by _fetch().

eZDFSFileHandlerMySQLiBackend::_abortCacheGeneration (   $generatingFilePath)

Aborts the cache generation process by removing the .generating file.

Parameters
string$filePathReal cache file path
string$generatingFilePath.generating cache file path
Returns
void
eZDFSFileHandlerMySQLiBackend::_begin (   $fname = false)
protected

Starts a new transaction by executing a BEGIN call.

If a transaction is already started nothing is executed.

Referenced by _abortCacheGeneration(), _endCacheGeneration(), _protect(), _purgeByLike(), and _rename().

eZDFSFileHandlerMySQLiBackend::_checkCacheGenerationTimeout (   $generatingFilePath,
  $generatingFileMtime 
)

Checks if generation has timed out by looking for the .generating file and comparing its timestamp to the one assigned when the file was created.

Parameters
string$generatingFilePath
int$generatingFileMtime
Returns
bool true if the file didn't timeout, false otherwise
eZDFSFileHandlerMySQLiBackend::_commit (   $fname = false)
protected

Stops a current transaction and commits the changes by executing a COMMIT call.

If the current transaction is a sub-transaction nothing is executed.

Referenced by _abortCacheGeneration(), _endCacheGeneration(), _protect(), _purgeByLike(), and _rename().

eZDFSFileHandlerMySQLiBackend::_connect ( )

Connects to the database.

Returns
void
Exceptions
eZClusterHandlerDBNoConnectionException
eZClusterHandlerDBNoDatabaseException
eZDFSFileHandlerMySQLiBackend::_copy (   $srcFilePath,
  $dstFilePath,
  $fname = false 
)

Creates a copy of a file in DB+DFS.

Parameters
string$srcFilePathSource file
string$dstFilePathDestination file
string$fname
Returns
bool
See Also
_copyInner

Referenced by _linkCopy().

eZDFSFileHandlerMySQLiBackend::_copyInner (   $srcFilePath,
  $dstFilePath,
  $fname,
  $metaData 
)
private

Inner function used by _copy to perform the operation in a transaction.

Parameters
string$srcFilePath
string$dstFilePath
bool$fname
array$metaDataSource file's metadata
Returns
bool
See Also
_copy
eZDFSFileHandlerMySQLiBackend::_delete (   $filePath,
  $insideOfTransaction = false,
  $fname = false 
)

Deletes a file from DB.

The file won't be removed from disk, _purge has to be used for this. Only single files will be deleted, to delete multiple files, _deleteByLike has to be used.

Parameters
string$filePathPath of the file to delete
bool$insideOfTransactionWether or not a transaction is already started
bool | string$fnameOptional caller name for debugging
See Also
_deleteInner
_deleteByLike
Returns
bool

Referenced by _copyInner().

eZDFSFileHandlerMySQLiBackend::_deleteByDirList (   $dirList,
  $commonPath,
  $commonSuffix,
  $fname = false 
)
eZDFSFileHandlerMySQLiBackend::_deleteByDirListInner (   $dirList,
  $commonPath,
  $commonSuffix,
  $fname 
)
protected
eZDFSFileHandlerMySQLiBackend::_deleteByLike (   $like,
  $fname = false 
)

Deletes multiple files using a SQL LIKE statement.

Use _delete if you need to delete single files

Parameters
string$likeSQL LIKE condition applied to ezdfsfile.name to look for files to delete. Will use name_trunk if the LIKE string matches a filetype that supports name_trunk.
string$fnameOptional caller name for debugging
Returns
bool
See Also
_deleteByLikeInner
_delete
eZDFSFileHandlerMySQLiBackend::_deleteByLikeInner (   $like,
  $fname 
)
private

Callback used by _deleteByLike to perform the deletion.

Parameters
string$like
mixed$fname
Returns
eZDFSFileHandlerMySQLiBackend::_deleteByWildcard (   $wildcard,
  $fname = false 
)

Deletes multiple DB files by wildcard.

Parameters
string$wildcard
mixed$fname
Returns
bool
Deprecated:
Has severe performance issues
eZDFSFileHandlerMySQLiBackend::_deleteByWildcardInner (   $wildcard,
  $fname 
)
protected

Callback used by _deleteByWildcard to perform the deletion.

Parameters
mixed$wildcard
mixed$fname
Returns
bool
Deprecated:
Has severe performance issues
eZDFSFileHandlerMySQLiBackend::_deleteInner (   $filePath,
  $fname 
)
protected

Callback method used by by _delete to delete a single file.

Parameters
string$filePathPath of the file to delete
string$fnameOptional caller name for debugging
Returns
bool

Referenced by _delete().

eZDFSFileHandlerMySQLiBackend::_die (   $msg,
  $sql = null 
)
protected

Handles a DB error, displaying it as an eZDebug error.

See Also
eZDebug::writeError
Parameters
string$msgMessage to display
string$sqlSQL query to display error for
Returns
void
Todo:
to be fixed: will this generate a warning?
eZDFSFileHandlerMySQLiBackend::_disconnect ( )

Disconnects the handler from the database.

eZDFSFileHandlerMySQLiBackend::_endCacheGeneration (   $filePath,
  $generatingFilePath,
  $rename 
)

Ends the cache generation for the current file: moves the (meta)data for the .generating file to the actual file, and removed the .generating.

Parameters
string$filePath
Returns
bool
eZDFSFileHandlerMySQLiBackend::_error (   $query,
  $fname,
  $error = "Failed to execute SQL for function:" 
)
protected

Prints error message $error to debug system.

Parameters
string$queryThe query that was attempted, will be printed if $error is false
string$fnameThe function name that started the query, should contain relevant arguments in the text.
string$errorThe error message, if this is an array the first element is the value to dump and the second the error header (for eZDebug::writeNotice). If this is false a generic message is shown.

Referenced by _checkCacheGenerationTimeout(), _query(), and _selectOne().

eZDFSFileHandlerMySQLiBackend::_exists (   $filePath,
  $fname = false,
  $ignoreExpiredFiles = true,
  $checkOnDFS = false 
)

Referenced by _rename().

eZDFSFileHandlerMySQLiBackend::_fail (   $value,
  $text = false 
)
protected

Creates an error object which can be read by some backend functions.

Parameters
mixed$valueThe value which is sent to the debug system.
string$textThe text/header for the value.

Referenced by _connect(), _copyInner(), _deleteByLikeInner(), _deleteByWildcardInner(), _deleteInner(), _purge(), _purgeByLike(), _rename(), _storeContentsInner(), and _storeInner().

eZDFSFileHandlerMySQLiBackend::_fetch (   $filePath,
  $uniqueName = false 
)

Fetches the file $filePath from the database to its own name.

Saving $filePath locally with its original name, or $uniqueName if given

Parameters
string$filePath
bool | string$uniqueNameAlternative name to save the file to
Returns
string|bool the file physical path, or false if fetch failed
eZDFSFileHandlerMySQLiBackend::_fetchContents (   $filePath,
  $fname = false 
)
eZDFSFileHandlerMySQLiBackend::_fetchMetadata (   $filePath,
  $fname = false 
)

Fetches and returns metadata for $filePath.

Returns
array|false file metadata, or false if the file does not exist in database.

Referenced by _copy(), _fetch(), _fetchContents(), _passThrough(), and _rename().

eZDFSFileHandlerMySQLiBackend::_getFileList (   $scopes = false,
  $excludeScopes = false,
  $limit = false,
  $path = false 
)

gets the list of cluster files, filtered by the optional params

Parameters
array$scopesfilter by array of scopes to include in the list
bool$excludescopesif true, $scopes param acts as an exclude filter
string$pathfilter to include entries only including $path
array$limitlimits the search to offset limit[0], limit limit[1]
Returns
array|false the db list of entries of false if none found
eZDFSFileHandlerMySQLiBackend::_handleErrorType (   $res)
protected

Referenced by _delete().

eZDFSFileHandlerMySQLiBackend::_insert (   $table,
  $array,
  $fname 
)

Performs an insert of the given items in $array.

Parameters
string$tableName of table to execute insert on.
array$arrayAssociative array with data to insert, the keys are the field names and the values will be quoted according to type.
string$fnameName of caller function (for logging purpuse)
eZDFSFileHandlerMySQLiBackend::_insertUpdate (   $table,
  $array,
  $update,
  $fname,
  $reportError = true 
)
protected

Performs an insert of the given items in $array.

If entry specified already exists the $update SQL is executed to update the entry instead.

Parameters
string$tableName of table to execute insert on.
arrayarray $array Associative array with data to insert, the keys are the field names and the values will be quoted according to type.
string$updatePartial update SQL which is executed when entry exists.
string$fnameName of caller function (for logging purpuse)

Referenced by _copyInner(), _storeContentsInner(), and _storeInner().

eZDFSFileHandlerMySQLiBackend::_isFailure (   $result)
protected

Checks if $result is a failure type and returns true if so, false otherwise.

A failure is either the value false or an error object of type eZMySQLBackendError.

eZDFSFileHandlerMySQLiBackend::_linkCopy (   $srcPath,
  $dstPath,
  $fname = false 
)
eZDFSFileHandlerMySQLiBackend::_md5 (   $value)
protected

Provides the SQL calls to convert $value to MD5 The returned value can directly be put into SQLs.

Referenced by _abortCacheGeneration(), _checkCacheGenerationTimeout(), _deleteInner(), _endCacheGeneration(), _exists(), _fetchMetadata(), _purge(), _rename(), and _startCacheGeneration().

eZDFSFileHandlerMySQLiBackend::_passThrough (   $filePath,
  $startOffset = 0,
  $length = false,
  $fname = false 
)

Passes $filePath content through.

Parameters
string$filePath
int$offsetByte offset to start download from
int$lengthByte length to be sent
Returns
bool
eZDFSFileHandlerMySQLiBackend::_protect ( )
protected

Protects a custom function with SQL queries in a database transaction.

If the function reports an error the transaction is ROLLBACKed.

The first argument to the _protect() is the callback and the second is the name of the function (for query reporting). The remainder of arguments are sent to the callback.

A return value of false from the callback is considered a failure, any other value is returned from _protect(). For extended error handling call _fail() and return the value.

Referenced by _copy(), _delete(), _deleteByDirList(), _deleteByLike(), _deleteByWildcard(), _store(), and _storeContents().

eZDFSFileHandlerMySQLiBackend::_purge (   $filePath,
  $onlyExpired = false,
  $expiry = false,
  $fname = false 
)

Purges meta-data and file-data for a file entry.

Will only expire a single file. Use _purgeByLike to purge multiple files

Parameters
string$filePathPath of the file to purge
bool$onlyExpiredOnly purges expired files
bool | int$expiry
bool$fname
See Also
_purgeByLike

Referenced by _rename().

eZDFSFileHandlerMySQLiBackend::_purgeByLike (   $like,
  $onlyExpired = false,
  $limit = 50,
  $expiry = false,
  $fname = false 
)

Purges meta-data and file-data for files matching a pattern using a SQL LIKE syntax.

Parameters
string$likeSQL LIKE string applied to ezdfsfile.name to look for files to purge
bool$onlyExpiredOnly purge expired files (ezdfsfile.expired = 1)
integer$limitMaximum number of items to purge in one call
integer$expiryTimestamp used to limit deleted files: only files older than this date will be deleted
mixed$fnameOptional caller name for debugging
See Also
_purge
Returns
bool|int false if it fails, number of affected rows otherwise
Todo:
This method should also remove the files from disk
eZDFSFileHandlerMySQLiBackend::_query (   $query,
  $fname = false,
  $reportError = true 
)
protected

Performs mysql query and returns mysql result.

Times the sql execution, adds accumulator timings and reports SQL to debug.

Parameters
string$fnameThe function name that started the query, should contain relevant arguments in the text.

Referenced by _abortCacheGeneration(), _begin(), _commit(), _deleteByDirListInner(), _deleteByLikeInner(), _deleteByWildcardInner(), _deleteInner(), _endCacheGeneration(), _getFileList(), _insert(), _insertUpdate(), _purge(), _purgeByLike(), _rename(), _rollback(), _startCacheGeneration(), and expiredFilesList().

eZDFSFileHandlerMySQLiBackend::_quote (   $value,
  $escapeUnderscoreWildcards = false 
)
protected

Make sure that $value is escaped and qouted according to type and returned as a string.

Parameters
string$valuea SQL parameter to escape
bool$escapeUnderscoreWildcardsSet to true to escape underscores as well to avoid them to act as wildcards Highly recommended for LIKE statements !
Returns
string a string that can safely be used in SQL queries

Referenced by _deleteByDirListInner(), _deleteByLikeInner(), _purgeByLike(), and _sqlList().

eZDFSFileHandlerMySQLiBackend::_rename (   $srcFilePath,
  $dstFilePath 
)

Renames $srcFilePath to $dstFilePath.

Parameters
string$srcFilePath
string$dstFilePath
Returns
bool
eZDFSFileHandlerMySQLiBackend::_report (   $query,
  $fname,
  $timeTaken,
  $numRows = false 
)

Report SQL $query to debug system.

Parameters
string$fnameThe function name that started the query, should contain relevant arguments in the text.
int$timeTakenNumber of seconds the query + related operations took (as float).
int$numRowsNumber of affected rows.

Referenced by _checkCacheGenerationTimeout(), _query(), and _selectOne().

eZDFSFileHandlerMySQLiBackend::_rollback (   $fname = false)
protected

Stops a current transaction and discards all changes by executing a ROLLBACK call.

If the current transaction is a sub-transaction nothing is executed.

Referenced by _endCacheGeneration(), _protect(), _purgeByLike(), and _rename().

eZDFSFileHandlerMySQLiBackend::_selectOne (   $query,
  $fname,
  $error = false,
  $debug = false,
  $fetchCall 
)
protected

Runs a select query, applying the $fetchCall callback to one result If there are more than one row it will fail and exit, if 0 it returns false.

Parameters
string$fnameThe function name that started the query, should contain relevant arguments in the text.
string$errorSent to _error() in case of errors
bool$debugIf true it will display the fetched row in addition to the SQL.
callback$fetchCallThe callback to fetch the row.
Returns
mixed

Referenced by _selectOneAssoc(), and _selectOneRow().

eZDFSFileHandlerMySQLiBackend::_selectOneAssoc (   $query,
  $fname,
  $error = false,
  $debug = false 
)
protected

Runs a select query and returns one associative row from the result.

If there are more than one row it will fail and exit, if 0 it returns false.

Parameters
string$query
string$fnameThe function name that started the query, should contain relevant arguments in the text.
string$errorSent to _error() in case of errors
bool$debugIf true it will display the fetched row in addition to the SQL.
Returns
array|false

Referenced by _fetchMetadata().

eZDFSFileHandlerMySQLiBackend::_selectOneRow (   $query,
  $fname,
  $error = false,
  $debug = false 
)
protected

Runs a select query and returns one numeric indexed row from the result If there are more than one row it will fail and exit, if 0 it returns false.

Parameters
string$query
string$fnameThe function name that started the query, should contain relevant arguments in the text.
string$errorSent to _error() in case of errors
bool$debugIf true it will display the fetched row in addition to the SQL.
Returns
array|false

Referenced by _exists(), and _startCacheGeneration().

eZDFSFileHandlerMySQLiBackend::_sqlList (   $array)
protected

Formats a list of entries as an SQL list which is separated by commas.

Each entry in the list is quoted using _quote().

Parameters
array$array
Returns
array

Referenced by _endCacheGeneration(), _insert(), _insertUpdate(), and expiredFilesList().

eZDFSFileHandlerMySQLiBackend::_startCacheGeneration (   $filePath,
  $generatingFilePath 
)

Attempts to begin cache generation by creating a new file named as the given filepath, suffixed with .generating.

If the file already exists, insertion is not performed and false is returned (means that the file is already being generated)

Parameters
string$filePath
Returns
array array with 2 indexes: 'result', containing either ok or ko, and another index that depends on the result:
  • if result == 'ok', the 'mtime' index contains the generating file's mtime
  • if result == 'ko', the 'remaining' index contains the remaining generation time (time until timeout) in seconds
eZDFSFileHandlerMySQLiBackend::_store (   $filePath,
  $datatype,
  $scope,
  $fname = false 
)

Stores $filePath to cluster.

Parameters
string$filePath
string$datatype
string$scope
string$fname
Returns
void
eZDFSFileHandlerMySQLiBackend::_storeContents (   $filePath,
  $contents,
  $scope,
  $datatype,
  $mtime = false,
  $fname = false 
)

Stores $contents as the contents of $filePath to the cluster.

Parameters
string$filePath
string$contents
string$scope
string$datatype
int$mtime
string$fname
Returns
void
eZDFSFileHandlerMySQLiBackend::_storeContentsInner (   $filePath,
  $contents,
  $scope,
  $datatype,
  $curTime,
  $fname 
)
eZDFSFileHandlerMySQLiBackend::_storeInner (   $filePath,
  $datatype,
  $scope,
  $fname 
)

Callback function used to perform the actual file store operation.

Parameters
string$filePath
string$datatype
string$scope
string$fname
See Also
eZDFSFileHandlerMySQLiBackend::_store()
Returns
bool
eZDFSFileHandlerMySQLiBackend::expiredFilesList (   $scopes,
  $limit = array( 0, 100 ),
  $expiry = false 
)

Returns the list of expired files.

Parameters
array$scopesArray of scopes to consider. At least one.
int$limitMax number of items. Set to false for unlimited.
int$expiryNumber of seconds, only items older than this will be returned.
Returns
array(filepath)
Since
4.3
static eZDFSFileHandlerMySQLiBackend::nameTrunk (   $filePath,
  $scope 
)
staticprotected

Returns the name_trunk for a file path.

Parameters
string$filePath
string$scope
Returns
string

Referenced by _endCacheGeneration().

eZDFSFileHandlerMySQLiBackend::registerListener ( eZClusterEventListener  $listener)

Registers $listener as the cluster event listener.

Parameters
eZClusterEventListener$listener
Returns
void

Implements eZClusterEventNotifier.

eZDFSFileHandlerMySQLiBackend::remainingCacheGenerationTime (   $row)
protected

Returns the remaining time, in seconds, before the generating file times out.

Parameters
resource$fileRow
Returns
int Remaining generation seconds. A negative value indicates a timeout.

Referenced by _startCacheGeneration().

Member Data Documentation

eZDFSFileHandlerMySQLiBackend::$db = null
eZDFSFileHandlerMySQLiBackend::$dbparams = null
staticprotected
eZDFSFileHandlerMySQLiBackend::$dfsbackend = null
protected
eZDFSFileHandlerMySQLiBackend::$eventHandler
protected
eZDFSFileHandlerMySQLiBackend::$maxCopyTries
protected
eZDFSFileHandlerMySQLiBackend::$numQueries = 0
protected

Referenced by _report().

eZDFSFileHandlerMySQLiBackend::$transactionCount = 0
protected
const eZDFSFileHandlerMySQLiBackend::TABLE_METADATA = 'ezdfsfile'
const eZDFSFileHandlerMySQLiBackend::TIME_UNTIL_RETRY = 100

Wait for n microseconds until retry if copy fails, to avoid DFS overload.


The documentation for this class was generated from the following file: