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
IOException
public DistributorDirectory(Distributor distributor) throws IOException
IOException
public final String[] listAll() throws IOException
listAll
in class org.apache.lucene.store.Directory
IOException
public boolean fileExists(String name) throws IOException
fileExists
in class org.apache.lucene.store.Directory
IOException
public void deleteFile(String name) throws IOException
deleteFile
in class org.apache.lucene.store.Directory
IOException
public long fileLength(String name) 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 String getLockID()
getLockID
in class org.apache.lucene.store.Directory
public String toString()
toString
in class org.apache.lucene.store.Directory
public 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–2015. All rights reserved.