|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.store.Directory org.elasticsearch.common.lucene.store.SwitchDirectory
public class SwitchDirectory
A Directory instance that switches files between two other Directory instances.
Files with the specified extensions are placed in the primary directory; others are placed in the secondary directory.
Field Summary |
---|
Fields inherited from class org.apache.lucene.store.Directory |
---|
isOpen, lockFactory |
Constructor Summary | |
---|---|
SwitchDirectory(Set<String> primaryExtensions,
org.apache.lucene.store.Directory primaryDir,
org.apache.lucene.store.Directory secondaryDir,
boolean doClose)
|
Method Summary | |
---|---|
void |
close()
|
org.apache.lucene.store.IndexOutput |
createOutput(String name)
|
void |
deleteFile(String name)
|
boolean |
fileExists(String name)
|
long |
fileLength(String name)
|
long |
fileModified(String name)
|
void |
forceSync(String name)
Similar to Directory.sync(String) but forces it even if its
disabled. |
static String |
getExtension(String name)
Utility method to return a file's extension. |
String[] |
listAll()
|
org.apache.lucene.store.IndexInput |
openInput(String name)
|
org.apache.lucene.store.Directory |
primaryDir()
Return the primary directory |
com.google.common.collect.ImmutableSet<String> |
primaryExtensions()
|
org.apache.lucene.store.Directory |
secondaryDir()
Return the secondary directory |
void |
sync(Collection<String> names)
|
void |
sync(String name)
|
void |
touchFile(String name)
|
Methods inherited from class org.apache.lucene.store.Directory |
---|
clearLock, copy, copy, ensureOpen, getLockFactory, getLockID, makeLock, openInput, setLockFactory, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SwitchDirectory(Set<String> primaryExtensions, org.apache.lucene.store.Directory primaryDir, org.apache.lucene.store.Directory secondaryDir, boolean doClose)
Method Detail |
---|
public com.google.common.collect.ImmutableSet<String> primaryExtensions()
public org.apache.lucene.store.Directory primaryDir()
public org.apache.lucene.store.Directory secondaryDir()
public void close() throws IOException
close
in interface Closeable
close
in class org.apache.lucene.store.Directory
IOException
public String[] listAll() throws IOException
listAll
in class org.apache.lucene.store.Directory
IOException
public static String getExtension(String name)
public boolean fileExists(String name) throws IOException
fileExists
in class org.apache.lucene.store.Directory
IOException
public long fileModified(String name) throws IOException
fileModified
in class org.apache.lucene.store.Directory
IOException
public void touchFile(String name) throws IOException
touchFile
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) 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 void sync(String name) throws IOException
sync
in class org.apache.lucene.store.Directory
IOException
public void forceSync(String name) throws IOException
ForceSyncDirectory
Directory.sync(String)
but forces it even if its
disabled.
forceSync
in interface ForceSyncDirectory
IOException
public org.apache.lucene.store.IndexInput openInput(String name) throws IOException
openInput
in class org.apache.lucene.store.Directory
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |