public class StandardDirectoryFactory extends CachingDirectoryFactory
FSDirectory based behavior.
File based DirectoryFactory implementations generally extend
this class.CachingDirectoryFactory.CacheValue, CachingDirectoryFactory.CloseListenerDirectoryFactory.DirContextbyDirectoryCache, byPathCache, closeListeners, removeEntriesIOCONTEXT_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 |
exists(String path)
Returns true if a Directory exists for a given path.
|
boolean |
isAbsolute(String 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.
|
protected void |
removeDirectory(CachingDirectoryFactory.CacheValue cacheValue) |
addCloseListener, close, doneWithDirectory, get, getLivePaths, incRef, init, release, remove, remove, remove, remove, stripTrailingSlashempty, getDataHome, isSharedStorage, searchersReserveCommitPoints, 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 CachingDirectoryFactorypath - to normalizeIOException - on io errorpublic boolean exists(String path) throws IOException
DirectoryFactoryexists in class CachingDirectoryFactoryIOException - If there is a low-level I/O error.public boolean isPersistent()
isPersistent in class DirectoryFactorypublic boolean isAbsolute(String path)
isAbsolute in class DirectoryFactorypath - the path to checkprotected void removeDirectory(CachingDirectoryFactory.CacheValue cacheValue) throws IOException
removeDirectory in class CachingDirectoryFactoryIOExceptionpublic 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-2015 Apache Software Foundation. All Rights Reserved.