org.apache.lucene.store
Class SingleInstanceLockFactory
public class SingleInstanceLockFactory
Implements
LockFactory
for a single in-process instance,
meaning all locking will take place through this one instance.
Only use this
LockFactory
when you are certain all
IndexReaders and IndexWriters for a given index are running
against a single shared in-process Directory instance. This is
currently the default locking for RAMDirectory.
void | clearLock(String lockName) - Attempt to clear (forcefully unlock and remove) the
specified lock.
|
Lock | makeLock(String lockName) - Return a new Lock instance identified by lockName.
|
clearLock
public void clearLock(String lockName)
throws IOException
Attempt to clear (forcefully unlock and remove) the
specified lock. Only call this at a time when you are
certain this lock is no longer in use.
- clearLock in interface LockFactory
lockName
- name of the lock to be cleared.
makeLock
public Lock makeLock(String lockName)
Return a new Lock instance identified by lockName.
- makeLock in interface LockFactory
lockName
- name of the lock to be created.
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.