public static function obtainWriteLock(Zend_Search_Lucene_Storage_Directory $lockDirectory)
    {
        $lock = $lockDirectory->createFile(self::WRITE_LOCK_FILE);
        if (!$lock->lock(LOCK_EX)) {
            include_once 'Zend/Search/Lucene/Exception.php';
            throw new Zend_Search_Lucene_Exception('Can\'t obtain exclusive index lock');
        }
        return $lock;
    }
public static function obtainWriteLock(Zend_Search_Lucene_Storage_Directory $lockDirectory)
    {
        $lock = $lockDirectory->createFile(self::WRITE_LOCK_FILE);
        if (!$lock->lock(LOCK_EX)) {
            include_once 'Zend/Search/Lucene/Exception.php';
            throw new Zend_Search_Lucene_Exception('Can\'t obtain exclusive index lock');
        }
        return $lock;
    }
public static function obtainWriteLock ( Zend_Search_Lucene_Storage_Directory $ lockDirectory ) { $ lock = $ lockDirectory -> createFile ( self :: WRITE_LOCK_FILE ) ; if ( ! $ lock -> lock ( LOCK_EX ) ) { include_once 'Zend/Search/Lucene/Exception.php' ; throw new Zend_Search_Lucene_Exception ( 'Can\'t obtain exclusive index lock' ) ; } return $ lock ; }
Obtain exclusive write lock on the index

@param  Zend_Search_Lucene_Storage_Directory $lockDirectory
@return Zend_Search_Lucene_Storage_File
@throws Zend_Search_Lucene_Exception
Obtain exclusive write lock on the index