public class BlockDirectory
extends org.apache.lucene.store.Directory
| Modifier and Type | Field and Description |
|---|---|
static long |
BLOCK_MOD |
static long |
BLOCK_SHIFT |
static int |
BLOCK_SIZE |
static org.slf4j.Logger |
LOG |
static Cache |
NO_CACHE |
| Constructor and Description |
|---|
BlockDirectory(String dirName,
org.apache.lucene.store.Directory directory,
Cache cache,
Set<String> blockCacheFileTypes,
boolean blockCacheReadEnabled,
boolean blockCacheWriteEnabled) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearLock(String name) |
void |
close() |
void |
copy(org.apache.lucene.store.Directory to,
String src,
String dest,
org.apache.lucene.store.IOContext context) |
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) |
static long |
getBlock(long pos) |
Cache |
getCache()
Expert: mostly for tests
|
org.apache.lucene.store.Directory |
getDirectory() |
org.apache.lucene.store.LockFactory |
getLockFactory() |
String |
getLockID() |
static long |
getPosition(long pos) |
static long |
getRealPosition(long block,
long positionInBlock) |
boolean |
isBlockCacheReadEnabled() |
boolean |
isBlockCacheWriteEnabled() |
String[] |
listAll() |
org.apache.lucene.store.Lock |
makeLock(String name) |
org.apache.lucene.store.IndexInput |
openInput(String name,
org.apache.lucene.store.IOContext context) |
void |
setLockFactory(org.apache.lucene.store.LockFactory lockFactory) |
void |
sync(Collection<String> names) |
String |
toString() |
public static org.slf4j.Logger LOG
public static final long BLOCK_SHIFT
public static final long BLOCK_MOD
public static final int BLOCK_SIZE
public static Cache NO_CACHE
public BlockDirectory(String dirName, org.apache.lucene.store.Directory directory, Cache cache, Set<String> blockCacheFileTypes, boolean blockCacheReadEnabled, boolean blockCacheWriteEnabled) throws IOException
IOExceptionpublic static long getBlock(long pos)
public static long getPosition(long pos)
public static long getRealPosition(long block,
long positionInBlock)
public 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 clearLock(String name) throws IOException
clearLock in class org.apache.lucene.store.DirectoryIOExceptionpublic Cache getCache()
public void copy(org.apache.lucene.store.Directory to,
String src,
String dest,
org.apache.lucene.store.IOContext context)
throws IOException
copy in class org.apache.lucene.store.DirectoryIOExceptionpublic org.apache.lucene.store.LockFactory getLockFactory()
getLockFactory in class org.apache.lucene.store.Directorypublic String getLockID()
getLockID in class org.apache.lucene.store.Directorypublic org.apache.lucene.store.Lock makeLock(String name)
makeLock in class org.apache.lucene.store.Directorypublic void setLockFactory(org.apache.lucene.store.LockFactory lockFactory)
throws IOException
setLockFactory in class org.apache.lucene.store.DirectoryIOExceptionpublic void sync(Collection<String> names) throws IOException
sync in class org.apache.lucene.store.DirectoryIOExceptionpublic String toString()
toString in class org.apache.lucene.store.Directorypublic 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 deleteFile(String name) throws IOException
deleteFile in class org.apache.lucene.store.DirectoryIOExceptionpublic boolean fileExists(String name) throws IOException
fileExists in class org.apache.lucene.store.DirectoryIOExceptionpublic long fileLength(String name) throws IOException
fileLength in class org.apache.lucene.store.DirectoryIOExceptionpublic String[] listAll() throws IOException
listAll in class org.apache.lucene.store.DirectoryIOExceptionpublic org.apache.lucene.store.Directory getDirectory()
public boolean isBlockCacheReadEnabled()
public boolean isBlockCacheWriteEnabled()
Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.