original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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
docstring_tokens: Obtain exclusive write lock on the index