/**
  * Constructor
  *
  * If provided with $filePath, will use this file for further operations.
  * If not given, the file* methods must be used instead
  *
  * @param string $filePath Path of the file to handle
  *
  * @throws eZDBNoConnectionException DB connection failed
  */
 function __construct($filePath = false)
 {
     if (self::$nonExistantStaleCacheHandling === null) {
         $fileINI = eZINI::instance('file.ini');
         self::$nonExistantStaleCacheHandling = $fileINI->variable("ClusteringSettings", "NonExistantStaleCacheHandling");
         unset($fileINI);
     }
     // DB Backend init
     if (self::$dbbackend === null) {
         self::$dbbackend = eZExtension::getHandlerClass(new ezpExtensionOptions(array('iniFile' => 'file.ini', 'iniSection' => 'eZDFSClusteringSettings', 'iniVariable' => 'DBBackend')));
         self::$dbbackend->_connect(false);
         $fileINI = eZINI::instance('file.ini');
         if ($fileINI->variable('ClusterEventsSettings', 'ClusterEvents') === 'enabled' && self::$dbbackend instanceof eZClusterEventNotifier) {
             $listener = eZExtension::getHandlerClass(new ezpExtensionOptions(array('iniFile' => 'file.ini', 'iniSection' => 'ClusterEventsSettings', 'iniVariable' => 'Listener', 'handlerParams' => array(new eZClusterEventLoggerEzdebug()))));
             if ($listener instanceof eZClusterEventListener) {
                 self::$dbbackend->registerListener($listener);
                 $listener->initialize();
             }
         }
     }
     if ($filePath !== false) {
         $filePath = self::cleanPath($filePath);
         eZDebugSetting::writeDebug('kernel-clustering', "dfs::ctor( '{$filePath}' )");
     } else {
         eZDebugSetting::writeDebug('kernel-clustering', "dfs::ctor()");
     }
     $this->filePath = $filePath;
 }
    /**
     * Constructor
     *
     * If provided with $filePath, will use this file for further operations.
     * If not given, the file* methods must be used instead
     *
     * @param string $filePath Path of the file to handle
     *
     * @throws eZDBNoConnectionException DB connection failed
     */
    function __construct( $filePath = false )
    {
        if ( self::$nonExistantStaleCacheHandling === null )
        {
            $fileINI = eZINI::instance( 'file.ini' );
            self::$nonExistantStaleCacheHandling = $fileINI->variable( "ClusteringSettings", "NonExistantStaleCacheHandling" );
            unset( $fileINI );
        }

        // DB Backend init
        if ( self::$dbbackend === null )
        {
            self::$dbbackend = eZExtension::getHandlerClass(
                new ezpExtensionOptions(
                    array( 'iniFile'     => 'file.ini',
                           'iniSection'  => 'eZDFSClusteringSettings',
                           'iniVariable' => 'DBBackend' ) ) );
            self::$dbbackend->_connect( false );
        }

        if ( $filePath !== false )
        {
            $filePath = eZDBFileHandler::cleanPath( $filePath );
            eZDebugSetting::writeDebug( 'kernel-clustering', "dfs::ctor( '$filePath' )" );
        }
        else
        {
            eZDebugSetting::writeDebug( 'kernel-clustering', "dfs::ctor()" );
        }

        $this->filePath = $filePath;
    }