|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.store.Directory org.apache.lucene.store.BaseDirectory
public abstract class BaseDirectory
Base implementation for a concrete Directory
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.lucene.store.Directory |
---|
Directory.IndexInputSlicer |
Field Summary | |
---|---|
protected boolean |
isOpen
|
protected LockFactory |
lockFactory
Holds the LockFactory instance (implements locking for this Directory instance). |
Constructor Summary | |
---|---|
protected |
BaseDirectory()
Sole constructor. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.lucene.store.Directory |
---|
close, copy, createOutput, createSlicer, deleteFile, fileExists, fileLength, getLockID, listAll, openInput, sync, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected volatile boolean isOpen
protected LockFactory lockFactory
Constructor Detail |
---|
protected BaseDirectory()
Method Detail |
---|
public Lock makeLock(String name)
Directory
Lock
.
makeLock
in class Directory
name
- the name of the lock filepublic 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 closed
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |