kernel/classes/ezclusterfilehandler.php
File containing the eZClusterFileHandler class.
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Business Use License Agreement Version 2.0
- Package
- kernel
- Version
- 4.6.0
\eZClusterFileHandler
File containing the eZClusterFileHandler class.
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Business Use License Agreement Version 2.0
- Version
- 4.6.0
Properties


\array(filename
$generatingFiles= 'array()'
Global list of currently generating files. Used by handlers that support stalecache.
=> eZClusterFileHandlerInterface)array()
Details- Type
- \array(filename


\eZClusterFileHandlerInterface
$globalHandler= ''
Global, generic (e.g. not linked to a file) cluster handler, used for caching
Methods


addGeneratingFile(
\eZDFSFileHandler | \eZDFSFileHandler $file
)
:
void
Adds a file to the generating list
Name | Type | Description |
---|---|---|
$file | \eZDFSFileHandler | \eZDFSFileHandler | Cluster file handler instance Note that this method expect a version of the handler where the filePath is the REAL one, not the .generating |


cleanupEmptyDirectories(
string $path
)
:
void
Goes trough the directory path and removes empty directories, starting at the leaf and deleting down until a non empty directory is reached.
If the path is not a directory, nothing will happen.
Name | Type | Description |
---|---|---|
$path | string |


cleanupGeneratingFiles(
)
:
void
Cluster shutdown handler. Terminates generation for unterminated files.
This situation doesn't happen by default, but may with custom code that doesn't follow recommendations.


instance(
string | bool $filename
=
false
)
:
\eZClusterFileHandlerInterface
Returns the configured instance of an eZClusterFileHandlerInterface See ClusteringSettings.FileHandler in file.ini
Name | Type | Description |
---|---|---|
$filename | string | bool | Optional filename the handler should be initialized with |
Type | Description |
---|---|
\eZClusterFileHandlerInterface |


preFork(
)
:
void
Performs required operations before forking a process
- disconnects DB based cluster handlers from the database


removeGeneratingFile(
\eZDBFileHandler | \eZDFSFileHandler $file
)
:
void
Removes a file from the generating list
Name | Type | Description |
---|---|---|
$file | \eZDBFileHandler | \eZDFSFileHandler | Cluster file handler instance Note that this method expect a version of the handler where the filePath is the REAL one, not the .generating |
- Todo
- Clustering: apply the eZClusterFileHandlerInterface to all cluster handlers