public final class DistributorDirectory extends org.apache .lucene .store .BaseDirectory
Distributor abstraction to distribute files across multiple data directories.
| Constructor and Description |
|---|
DistributorDirectory(org
Creates a new DistributorDirectory from multiple directories.
|
DistributorDirectory(Distributor
Creates a new DistributorDirectory form the given Distributor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
|
org |
createOutput(String
|
void |
deleteFile(String
|
boolean |
fileExists(String
|
long |
fileLength(String
|
String |
getLockID()
|
String |
listAll()
|
org |
openInput(String
|
void |
renameFile(DirectoryService
Renames the given source file to the given target file unless the target already exists.
|
void |
setLockFactory(org
|
void |
sync(Collection
|
String |
toString()
|
public DistributorDirectory(org.apache .lucene .store .Directory ... dirs) throws IOException
IOException
public DistributorDirectory(Distributordistributor) throws IOException
IOException
public final String[] listAll() throws IOException
listAll in class
org.apache.lucene.store.Directory
IOException
public boolean fileExists(Stringname) throws IOException
fileExists in class
org.apache.lucene.store.Directory
IOException
public void deleteFile(Stringname) throws IOException
deleteFile in class
org.apache.lucene.store.Directory
IOException
public long fileLength(Stringname) throws IOException
fileLength in class
org.apache.lucene.store.Directory
IOException
public org.apache .lucene .store .IndexOutput createOutput(String name, org .apache .lucene .store .IOContext context) throws IOException
createOutput in class
org.apache.lucene.store.Directory
IOException
public void sync(Collection<String > names) throws IOException
sync in class
org.apache.lucene.store.Directory
IOException
public org.apache .lucene .store .IndexInput openInput(String name, org .apache .lucene .store .IOContext context) throws IOException
openInput in class
org.apache.lucene.store.Directory
IOException
public void close()
throws IOException
close in interface
Closeable
close in interface
AutoCloseable
close in class
org.apache.lucene.store.Directory
IOException
public void setLockFactory(org.apache .lucene .store .LockFactory lockFactory) throws IOException
setLockFactory in class
org.apache.lucene.store.BaseDirectory
IOException
public StringgetLockID()
public StringtoString()
public void renameFile(DirectoryServicedirectoryService, String source, String dest) throws IOException
directoryService - the DirectoryService to use.
source - the source file name.
dest - the target file name
IOException - if the target file already exists.