public abstract class FSLockFactory extends LockFactory
Directory
is an FSDirectory.| Constructor and Description |
|---|
FSLockFactory() |
| Modifier and Type | Method and Description |
|---|---|
static FSLockFactory |
getDefault()
Returns the default locking implementation for this platform.
|
protected abstract Lock |
obtainFSLock(FSDirectory dir,
java.lang.String lockName)
Implement this method to obtain a lock for a FSDirectory instance.
|
Lock |
obtainLock(Directory dir,
java.lang.String lockName)
Return a new obtained Lock instance identified by lockName.
|
public static final FSLockFactory getDefault()
NativeFSLockFactory.public final Lock obtainLock(Directory dir, java.lang.String lockName) throws java.io.IOException
LockFactoryobtainLock in class LockFactorylockName - name of the lock to be created.LockObtainFailedException - (optional specific exception) if the lock could
not be obtained because it is currently held elsewhere.java.io.IOException - if any i/o error occurs attempting to gain the lockprotected abstract Lock obtainFSLock(FSDirectory dir, java.lang.String lockName) throws java.io.IOException
java.io.IOException - if the lock could not be obtained.Copyright © 2000–2025 The Apache Software Foundation. All rights reserved.