* Gets the native lock factory if it has been configured for use.
* @return the native lock factory (null if not configured for use)
* @throws IOException if an exception occurs
*/
private synchronized NativeFSLockFactory getNativeLockFactory() throws IOException {
NativeFSLockFactory factory = null;
if (this.luceneConfig.getUseNativeFSLockFactory()) {
File dir = new File(this.luceneConfig.getIndexLocation());
String path = dir.getCanonicalPath();
synchronized (NATIVEFSLOCKFACTORIES) {
factory = NATIVEFSLOCKFACTORIES.get(path);
if (factory == null) {
factory = new NativeFSLockFactory(dir);
NATIVEFSLOCKFACTORIES.put(path,factory);
}
}
//if (NATIVEFSLOCKFACTORY == null) {
// File lDir = new File(this.luceneConfig.getIndexLocation());