public class BlockDirectory extends 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,
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 releaseBlocksOnClose) |
Modifier and Type | Method and Description |
---|---|
void |
clearLock(String name) |
void |
close() |
void |
copy(Directory to,
String src,
String dest,
IOContext context) |
IndexOutput |
createOutput(String name,
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
|
Directory |
getDirectory() |
LockFactory |
getLockFactory() |
String |
getLockID() |
static long |
getPosition(long pos) |
static long |
getRealPosition(long block,
long positionInBlock) |
boolean |
isBlockCacheReadEnabled() |
boolean |
isBlockCacheWriteEnabled() |
String[] |
listAll() |
Lock |
makeLock(String name) |
IndexInput |
openInput(String name,
IOContext context) |
void |
setLockFactory(LockFactory lockFactory) |
void |
sync(Collection<String> names) |
String |
toString() |
ensureOpen, openChecksumInput
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, 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 releaseBlocksOnClose) 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 Directory
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Directory
IOException
public void clearLock(String name) throws IOException
clearLock
in class Directory
IOException
public Cache getCache()
public void copy(Directory to, String src, String dest, IOContext context) throws IOException
copy
in class Directory
IOException
public LockFactory getLockFactory()
getLockFactory
in class Directory
public void setLockFactory(LockFactory lockFactory) throws IOException
setLockFactory
in class Directory
IOException
public void sync(Collection<String> names) throws IOException
sync
in class Directory
IOException
public IndexOutput createOutput(String name, IOContext context) throws IOException
createOutput
in class Directory
IOException
public void deleteFile(String name) throws IOException
deleteFile
in class Directory
IOException
public boolean fileExists(String name) throws IOException
fileExists
in class Directory
IOException
public long fileLength(String name) throws IOException
fileLength
in class Directory
IOException
public String[] listAll() throws IOException
listAll
in class Directory
IOException
public Directory getDirectory()
public boolean isBlockCacheReadEnabled()
public boolean isBlockCacheWriteEnabled()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.