public class StandardDirectoryFactory extends CachingDirectoryFactory
FSDirectory based behavior.
File based DirectoryFactory implementations generally extend
this class.CachingDirectoryFactory.CacheValue, CachingDirectoryFactory.CloseListenerDirectoryFactory.DirContextbyDirectoryCache, byPathCache, closeListenersIOCONTEXT_NO_CACHE| Constructor and Description |
|---|
StandardDirectoryFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected Directory |
create(String path,
DirectoryFactory.DirContext dirContext)
Creates a new Directory for a given path.
|
boolean |
isPersistent() |
void |
move(Directory fromDir,
Directory toDir,
String fileName,
IOContext ioContext)
Override for more efficient moves.
|
String |
normalize(String path)
Normalize a given path.
|
void |
remove(Directory dir)
Removes the Directory's persistent storage.
|
void |
remove(String path)
This remove is special in that it may be called even after
the factory has been closed.
|
addCloseListener, close, doneWithDirectory, exists, get, get, incRef, init, releaseempty, sizeOf, sizeOfDirectoryprotected Directory create(String path, DirectoryFactory.DirContext dirContext) throws IOException
DirectoryFactorycreate in class CachingDirectoryFactoryIOException - If there is a low-level I/O error.public String normalize(String path) throws IOException
DirectoryFactorynormalize in class DirectoryFactorypath - to normalizeIOException - on io errorpublic boolean isPersistent()
isPersistent in class DirectoryFactorypublic void remove(Directory dir) throws IOException
DirectoryFactoryremove in class DirectoryFactoryIOException - If there is a low-level I/O error.public void remove(String path) throws IOException
DirectoryFactoryremove in class DirectoryFactorypath - to removeIOException - If there is a low-level I/O error.public void move(Directory fromDir, Directory toDir, String fileName, IOContext ioContext) throws IOException
Directory.sync(java.util.Collection) any file that will be
moved or avoid cached files through settings.move in class DirectoryFactoryIOException - If there is a low-level I/O error.Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.