public abstract class BaseDirectory extends Directory
Directory that uses a LockFactory for locking.| 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(LockFactory lockFactory)
Sole constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
ensureOpen()
Ensures this directory is still open. 
 | 
Lock | 
obtainLock(String name)
Acquires and returns a  
Lock for a file with the given name. | 
String | 
toString()  | 
close, copyFrom, createOutput, createTempOutput, deleteFile, fileLength, getPendingDeletions, getTempFileName, listAll, openChecksumInput, openInput, rename, sync, syncMetaDataprotected volatile boolean isOpen
protected final LockFactory lockFactory
protected BaseDirectory(LockFactory lockFactory)
public final Lock obtainLock(String name) throws IOException
DirectoryLock for a file with the given name.obtainLock in class Directoryname - the name of the lock fileLockObtainFailedException - (optional specific exception) if the lock could
         not be obtained because it is currently held elsewhere.IOException - if any i/o error occurs attempting to gain the lockprotected final void ensureOpen()
                         throws AlreadyClosedException
DirectoryensureOpen in class DirectoryAlreadyClosedException - if this directory is closed.Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.