org.apache.lucene.store

Class SimpleFSLockFactory

public class SimpleFSLockFactory extends LockFactory

Implements LockFactory using File#createNewFile(). This is currently the default LockFactory used for FSDirectory if no LockFactory instance is otherwise provided. Note that there are known problems with this locking implementation on NFS.

See Also: LockFactory

Constructor Summary
SimpleFSLockFactory(File lockDir)
Instantiate using the provided directory (as a File instance).
SimpleFSLockFactory(String lockDirName)
Instantiate using the provided directory name (String).
Method Summary
voidclearLock(String lockName)
LockmakeLock(String lockName)

Constructor Detail

SimpleFSLockFactory

public SimpleFSLockFactory(File lockDir)
Instantiate using the provided directory (as a File instance).

Parameters: lockDir where lock files should be created.

SimpleFSLockFactory

public SimpleFSLockFactory(String lockDirName)
Instantiate using the provided directory name (String).

Parameters: lockDirName where lock files should be created.

Method Detail

clearLock

public void clearLock(String lockName)

makeLock

public Lock makeLock(String lockName)
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.