public final class DistributorDirectory
extends org.apache.lucene.store.BaseDirectory
Distributor abstraction to distribute
files across multiple data directories.| Constructor and Description |
|---|
DistributorDirectory(org.apache.lucene.store.Directory... dirs)
Creates a new DistributorDirectory from multiple directories.
|
DistributorDirectory(Distributor distributor)
Creates a new DistributorDirectory form the given Distributor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.lucene.store.IndexOutput |
createOutput(String name,
org.apache.lucene.store.IOContext context) |
void |
deleteFile(String name) |
boolean |
fileExists(String name) |
long |
fileLength(String name) |
String |
getLockID() |
String[] |
listAll() |
org.apache.lucene.store.IndexInput |
openInput(String name,
org.apache.lucene.store.IOContext context) |
void |
renameFile(DirectoryService directoryService,
String source,
String dest)
Renames the given source file to the given target file unless the target already exists.
|
void |
setLockFactory(org.apache.lucene.store.LockFactory lockFactory) |
void |
sync(Collection<String> names) |
String |
toString() |
public DistributorDirectory(org.apache.lucene.store.Directory... dirs)
throws IOException
IOExceptionpublic DistributorDirectory(Distributor distributor) throws IOException
IOExceptionpublic final String[] listAll() throws IOException
listAll in class org.apache.lucene.store.DirectoryIOExceptionpublic boolean fileExists(String name) throws IOException
fileExists in class org.apache.lucene.store.DirectoryIOExceptionpublic void deleteFile(String name) throws IOException
deleteFile in class org.apache.lucene.store.DirectoryIOExceptionpublic long fileLength(String name) throws IOException
fileLength in class org.apache.lucene.store.DirectoryIOExceptionpublic org.apache.lucene.store.IndexOutput createOutput(String name, org.apache.lucene.store.IOContext context) throws IOException
createOutput in class org.apache.lucene.store.DirectoryIOExceptionpublic void sync(Collection<String> names) throws IOException
sync in class org.apache.lucene.store.DirectoryIOExceptionpublic org.apache.lucene.store.IndexInput openInput(String name, org.apache.lucene.store.IOContext context) throws IOException
openInput in class org.apache.lucene.store.DirectoryIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.lucene.store.DirectoryIOExceptionpublic void setLockFactory(org.apache.lucene.store.LockFactory lockFactory)
throws IOException
setLockFactory in class org.apache.lucene.store.BaseDirectoryIOExceptionpublic String getLockID()
getLockID in class org.apache.lucene.store.Directorypublic String toString()
toString in class org.apache.lucene.store.Directorypublic void renameFile(DirectoryService directoryService, String source, String dest) throws IOException
directoryService - the DirectoryService to use.source - the source file name.dest - the target file nameIOException - if the target file already exists.Copyright © 2009–2016. All rights reserved.