public class BlockDirectory extends FilterDirectory implements ShutdownAwareDirectory
Modifier and Type | Field and Description |
---|---|
static long |
BLOCK_MOD |
static long |
BLOCK_SHIFT |
static int |
BLOCK_SIZE |
static Cache |
NO_CACHE |
in
Constructor and Description |
---|
BlockDirectory(String dirName,
Directory directory,
Cache cache,
Set<String> blockCacheFileTypes,
boolean blockCacheReadEnabled,
boolean blockCacheWriteEnabled) |
BlockDirectory(String dirName,
Directory directory,
Cache cache,
Set<String> blockCacheFileTypes,
boolean blockCacheReadEnabled,
boolean blockCacheWriteEnabled,
boolean cacheMerges,
boolean cacheReadOnce) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
closeOnShutdown() |
IndexOutput |
createOutput(String name,
IOContext context) |
void |
deleteFile(String name) |
static long |
getBlock(long pos) |
Cache |
getCache()
Expert: mostly for tests
|
static long |
getPosition(long pos) |
static long |
getRealPosition(long block,
long positionInBlock) |
boolean |
isBlockCacheReadEnabled() |
boolean |
isBlockCacheWriteEnabled() |
IndexInput |
openInput(String name,
IOContext context) |
createTempOutput, fileLength, getDelegate, listAll, obtainLock, rename, sync, syncMetaData, toString, unwrap
copyFrom, ensureOpen, openChecksumInput
public static final long BLOCK_SHIFT
public static final int BLOCK_SIZE
public static final long BLOCK_MOD
public static Cache NO_CACHE
public BlockDirectory(String dirName, Directory directory, Cache cache, Set<String> blockCacheFileTypes, boolean blockCacheReadEnabled, boolean blockCacheWriteEnabled) throws IOException
IOException
public BlockDirectory(String dirName, Directory directory, Cache cache, Set<String> blockCacheFileTypes, boolean blockCacheReadEnabled, boolean blockCacheWriteEnabled, boolean cacheMerges, boolean cacheReadOnce) throws IOException
IOException
public static long getBlock(long pos)
public static long getPosition(long pos)
public static long getRealPosition(long block, long positionInBlock)
public IndexInput openInput(String name, IOContext context) throws IOException
openInput
in class FilterDirectory
IOException
public void closeOnShutdown() throws IOException
closeOnShutdown
in interface ShutdownAwareDirectory
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterDirectory
IOException
public Cache getCache()
public IndexOutput createOutput(String name, IOContext context) throws IOException
createOutput
in class FilterDirectory
IOException
public void deleteFile(String name) throws IOException
deleteFile
in class FilterDirectory
IOException
public boolean isBlockCacheReadEnabled()
public boolean isBlockCacheWriteEnabled()
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.