public abstract class DirectoryFactory extends Object implements NamedListInitializedPlugin, Closeable
Constructor and Description |
---|
DirectoryFactory() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addCloseListener(Directory dir,
CachingDirectoryFactory.CloseListener closeListener)
Adds a close listener for a Directory.
|
abstract void |
close()
Close the this and all of the Directories it contains.
|
protected abstract Directory |
create(String path)
Creates a new Directory for a given path.
|
abstract void |
doneWithDirectory(Directory directory)
Indicates a Directory will no longer be used, and when it's ref count
hits 0, it can be closed.
|
abstract boolean |
exists(String path)
Returns true if a Directory exists for a given path.
|
abstract Directory |
get(String path,
String rawLockType)
Returns the Directory for a given path, using the specified rawLockType.
|
abstract Directory |
get(String path,
String rawLockType,
boolean forceNew)
Returns the Directory for a given path, using the specified rawLockType.
|
abstract void |
incRef(Directory directory)
Increment the number of references to the given Directory.
|
abstract void |
release(Directory directory)
Releases the Directory so that it may be closed when it is no longer
referenced.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init
public abstract void doneWithDirectory(Directory directory) throws IOException
IOException
- If there is a low-level I/O error.public abstract void addCloseListener(Directory dir, CachingDirectoryFactory.CloseListener closeListener)
public abstract void close() throws IOException
close
in interface Closeable
IOException
- If there is a low-level I/O error.protected abstract Directory create(String path) throws IOException
IOException
- If there is a low-level I/O error.public abstract boolean exists(String path)
public abstract Directory get(String path, String rawLockType) throws IOException
IOException
- If there is a low-level I/O error.public abstract Directory get(String path, String rawLockType, boolean forceNew) throws IOException
doneWithDirectory(Directory)
in this case - the old Directory
will be closed when it's ref count hits 0.IOException
- If there is a low-level I/O error.public abstract void incRef(Directory directory)
public abstract void release(Directory directory) throws IOException
IOException
- If there is a low-level I/O error.Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.