\Zend_Search_Lucene_LockManager
This is an utility class which provides index locks processing functionality
- Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
- License: http://framework.zend.com/license/new-bsd New BSD License
Synopsis
class Zend_Search_Lucene_LockManager
{
- // constants
- const WRITE_LOCK_FILE = 'write.lock.file';
- const READ_LOCK_FILE = 'read.lock.file';
- const READ_LOCK_PROCESSING_LOCK_FILE = 'read-lock-processing.lock.file';
- const OPTIMIZATION_LOCK_FILE = 'optimization.lock.file';
- // methods
- public static Zend_Search_Lucene_Storage_File obtainWriteLock()
- public static void releaseWriteLock()
- private static Zend_Search_Lucene_Storage_File _startReadLockProcessing()
- private static void _stopReadLockProcessing()
- public static Zend_Search_Lucene_Storage_File obtainReadLock()
- public static void releaseReadLock()
- public static boolean escalateReadLock()
- public static void deEscalateReadLock()
- public static mixed obtainOptimizationLock()
- public static void releaseOptimizationLock()
Constants
Name | Value |
---|---|
WRITE_LOCK_FILE | 'write.lock.file' |
READ_LOCK_FILE | 'read.lock.file' |
READ_LOCK_PROCESSING_LOCK_FILE | 'read-lock-processing.lock.file' |
OPTIMIZATION_LOCK_FILE | 'optimization.lock.file' |
Methods
private
- _startReadLockProcessing() — Obtain the exclusive "read escalation/de-escalation" lock
- _stopReadLockProcessing() — Release the exclusive "read escalation/de-escalation" lock
public
- deEscalateReadLock() — De-escalate Read lock to shared level
- escalateReadLock() — Escalate Read lock to exclusive level
- obtainOptimizationLock() — Obtain exclusive optimization lock on the index
- obtainReadLock() — Obtain shared read lock on the index
- obtainWriteLock() — Obtain exclusive write lock on the index
- releaseOptimizationLock() — Release exclusive optimization lock
- releaseReadLock() — Release shared read lock
- releaseWriteLock() — Release exclusive write lock