Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Static Public Member Functions | Static Public Attributes | Static Private Attributes | List of all members
eZClusterFileHandler Class Reference

## Static Public Member Functions
static | instance ( $filename=false)
static | resetHandler ()
static | cleanupGeneratingFiles ()
static | cleanupEmptyDirectories ( $path)
static | addGeneratingFile ( $file)
static | removeGeneratingFile ( $file)
static | preFork ()

## Static Public Attributes
static | $globalHandler

## Static Private Attributes
static | $generatingFiles = array()
static | $isShutdownFunctionRegistered = false

## Detailed Description

Special failure object which can be used by some of the cluster functions to inform about failures or special exceptions.

Currently used by the processCache function to report that the retrieve callback failed to retrieve data because of expiration.

Definition at line 11 of file ezclusterfilehandler.php.

## Member Function Documentation

## ◆ addGeneratingFile()

static eZClusterFileHandler::addGeneratingFile | ( |  | $file | ) |
| static

Adds a file to the generating list

Parameters

  eZDFSFileHandler | eZDFSFileHandler | $file | Cluster file handler instance Note that this method expect a version of the handler where the filePath is the REAL one, not the .generating

Definition at line 122 of file ezclusterfilehandler.php.

References $file.

Referenced by eZDFSFileHandler\startCacheGeneration().

## ◆ cleanupEmptyDirectories()

static eZClusterFileHandler::cleanupEmptyDirectories | ( |  | $path | ) |
| static

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.

Parameters

  string | $path |

Definition at line 103 of file ezclusterfilehandler.php.

References eZDir\cleanupEmptyDirectories(), eZDir\dirpath(), and eZDebugSetting\writeDebug().

Referenced by eZDFSFileHandlerDFSBackend\delete(), eZFSFileHandler\delete(), eZDFSFileHandler\deleteLocal(), eZDFSFileHandler\fileDeleteLocal(), eZFSFileHandler\purge(), eZDFSFileHandler\purge(), and eZDFSFileHandlerDFSBackend\renameOnDFS().

## ◆ cleanupGeneratingFiles()

static eZClusterFileHandler::cleanupGeneratingFiles | ( |  | ) |
| static

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.

Definition at line 78 of file ezclusterfilehandler.php.

References removeGeneratingFile(), and eZDebug\writeWarning().

Referenced by resetHandler().

## ◆ instance()

static eZClusterFileHandler::instance | ( |  | $filename = `false` | ) |
| static

Returns the configured instance of an eZClusterFileHandlerInterface See ClusteringSettings.FileHandler in file.ini

Parameters

  string | bool | $filename | Optional filename the handler should be initialized with

Returns
  eZClusterFileHandlerInterface

Definition at line 22 of file ezclusterfilehandler.php.

References $globalHandler, $options, eZExecution\addCleanupHandler(), and eZExtension\getHandlerClass().

Referenced by ezpRestCacheStorageCluster\countDataItems(), ezpRestCacheStorageCluster\delete(), eZContentLanguage\expireCache(), eZContentLanguage\fetchList(), eZWebDAVContentBackend\fetchNodeInfo(), ezpRestCacheStorageCluster\getRemainingLifetime(), eZWebDAVContentBackend\getResourceContents(), eZScriptClusterPurge\isRequired(), preFork(), ezpContentPublishingProcess\publish(), ezpRestCacheStorageCluster\restore(), eZScriptClusterPurge\run(), ezpRestCacheStorageCluster\store(), and eZURI\transformURI().

## ◆ preFork()

static eZClusterFileHandler::preFork | ( |  | ) |
| static

Performs required operations before forking a process

- disconnects DB based cluster handlers from the database

Definition at line 152 of file ezclusterfilehandler.php.

References instance().

Referenced by ezpContentPublishingProcess\publish().

## ◆ removeGeneratingFile()

static eZClusterFileHandler::removeGeneratingFile | ( |  | $file | ) |
| static

Removes a file from the generating list

Parameters

  eZDFSFileHandler | $file | 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

Definition at line 138 of file ezclusterfilehandler.php.

References $file.

Referenced by eZDFSFileHandler\abortCacheGeneration(), cleanupGeneratingFiles(), and eZDFSFileHandler\endCacheGeneration().

## ◆ resetHandler()

static eZClusterFileHandler::resetHandler | ( |  | ) |
| static

Resets the handler so that a new one can be loaded

Definition at line 68 of file ezclusterfilehandler.php.

References cleanupGeneratingFiles().

## Member Data Documentation

## ◆ $generatingFiles

eZClusterFileHandler::$generatingFiles = array()
| static private

Definition at line 170 of file ezclusterfilehandler.php.

## ◆ $globalHandler

eZClusterFileHandler::$globalHandler
| static

Definition at line 182 of file ezclusterfilehandler.php.

Referenced by instance().

## ◆ $isShutdownFunctionRegistered

eZClusterFileHandler::$isShutdownFunctionRegistered = false
| static private

Definition at line 176 of file ezclusterfilehandler.php.

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

- ezclusterfilehandler.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.