public abstract class BaseDirectory extends Directory
Directory.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isOpen |
protected LockFactory |
lockFactory
Holds the LockFactory instance (implements locking for
this Directory instance).
|
| Modifier | Constructor and Description |
|---|---|
protected |
BaseDirectory()
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearLock(String name)
Attempt to clear (forcefully unlock and remove) the
specified lock.
|
protected void |
ensureOpen() |
LockFactory |
getLockFactory()
Get the LockFactory that this Directory instance is
using for its locking implementation.
|
Lock |
makeLock(String name)
Construct a
Lock. |
void |
setLockFactory(LockFactory lockFactory)
Set the LockFactory that this Directory instance should
use for its locking implementation.
|
close, copy, createOutput, deleteFile, fileExists, fileLength, getLockID, listAll, openChecksumInput, openInput, sync, toStringprotected volatile boolean isOpen
protected LockFactory lockFactory
public Lock makeLock(String name)
DirectoryLock.public void clearLock(String name) throws IOException
DirectoryclearLock in class Directoryname - name of the lock to be cleared.IOExceptionpublic void setLockFactory(LockFactory lockFactory) throws IOException
DirectorysetLockFactory in class DirectorylockFactory - instance of LockFactory.IOExceptionpublic LockFactory getLockFactory()
DirectorygetLockFactory in class Directoryprotected final void ensureOpen()
throws AlreadyClosedException
ensureOpen in class DirectoryAlreadyClosedException - if this Directory is closedCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.