public class FlippingDirectory
extends Directory
| Modifier and Type | Field and Description |
|---|---|
private Directory |
wrapped |
| Constructor and Description |
|---|
FlippingDirectory(Directory toWrap)
Wrap a directory to start with
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearLock(String name) |
void |
close() |
IndexOutput |
createOutput(String name) |
void |
deleteFile(String name) |
boolean |
fileExists(String name) |
long |
fileLength(String name) |
long |
fileModified(String name) |
void |
flipTo(Directory other)
Switch to a different underlying directory.
|
LockFactory |
getLockFactory() |
String |
getLockID() |
String[] |
list() |
Lock |
makeLock(String name) |
IndexInput |
openInput(String name) |
void |
renameFile(String from,
String to) |
void |
setLockFactory(LockFactory lockFactory) |
void |
touchFile(String name) |
public FlippingDirectory(Directory toWrap)
public void flipTo(Directory other)
public void clearLock(String name)
throws IOException
clearLock in class DirectoryIOExceptionpublic void close()
throws IOException
close in class DirectoryIOExceptionpublic IndexOutput createOutput(String name)
throws IOException
createOutput in class DirectoryIOExceptionpublic void deleteFile(String name)
throws IOException
deleteFile in class DirectoryIOExceptionpublic boolean fileExists(String name)
throws IOException
fileExists in class DirectoryIOExceptionpublic long fileLength(String name)
throws IOException
fileLength in class DirectoryIOExceptionpublic long fileModified(String name)
throws IOException
fileModified in class DirectoryIOExceptionpublic LockFactory getLockFactory()
getLockFactory in class Directorypublic String getLockID()
getLockID in class Directorypublic String[] list()
throws IOException
list in class DirectoryIOExceptionpublic Lock makeLock(String name)
makeLock in class Directorypublic IndexInput openInput(String name)
throws IOException
openInput in class DirectoryIOExceptionpublic void renameFile(String from,
String to)
throws IOException
renameFile in class DirectoryIOExceptionpublic void setLockFactory(LockFactory lockFactory)
setLockFactory in class Directorypublic void touchFile(String name)
throws IOException
touchFile in class DirectoryIOException