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, toString
protected volatile boolean isOpen
protected LockFactory lockFactory
public Lock makeLock(String name)
Directory
Lock
.public void clearLock(String name) throws IOException
Directory
clearLock
in class Directory
name
- name of the lock to be cleared.IOException
public void setLockFactory(LockFactory lockFactory) throws IOException
Directory
setLockFactory
in class Directory
lockFactory
- instance of LockFactory
.IOException
public LockFactory getLockFactory()
Directory
getLockFactory
in class Directory
protected final void ensureOpen() throws AlreadyClosedException
ensureOpen
in class Directory
AlreadyClosedException
- if this Directory is closedCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.