org.apache.solr.store.blockcache
Class BlockDirectory
java.lang.Object
org.apache.lucene.store.Directory
org.apache.solr.store.blockcache.BlockDirectory
- All Implemented Interfaces:
- Closeable
public class BlockDirectory
- extends Directory
LOG
public static org.slf4j.Logger LOG
BLOCK_SHIFT
public static final long BLOCK_SHIFT
- See Also:
- Constant Field Values
BLOCK_MOD
public static final long BLOCK_MOD
- See Also:
- Constant Field Values
BLOCK_SIZE
public static final int BLOCK_SIZE
- See Also:
- Constant Field Values
NO_CACHE
public static Cache NO_CACHE
BlockDirectory
public BlockDirectory(String dirName,
Directory directory,
Cache cache,
Set<String> blockCacheFileTypes,
boolean blockCacheReadEnabled,
boolean blockCacheWriteEnabled)
throws IOException
- Throws:
IOException
getBlock
public static long getBlock(long pos)
getPosition
public static long getPosition(long pos)
getRealPosition
public static long getRealPosition(long block,
long positionInBlock)
openInput
public IndexInput openInput(String name,
IOContext context)
throws IOException
- Specified by:
openInput
in class Directory
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in class Directory
- Throws:
IOException
clearLock
public void clearLock(String name)
throws IOException
- Overrides:
clearLock
in class Directory
- Throws:
IOException
copy
public void copy(Directory to,
String src,
String dest,
IOContext context)
throws IOException
- Overrides:
copy
in class Directory
- Throws:
IOException
getLockFactory
public LockFactory getLockFactory()
- Overrides:
getLockFactory
in class Directory
getLockID
public String getLockID()
- Overrides:
getLockID
in class Directory
makeLock
public Lock makeLock(String name)
- Overrides:
makeLock
in class Directory
setLockFactory
public void setLockFactory(LockFactory lockFactory)
throws IOException
- Overrides:
setLockFactory
in class Directory
- Throws:
IOException
sync
public void sync(Collection<String> names)
throws IOException
- Specified by:
sync
in class Directory
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Directory
createOutput
public IndexOutput createOutput(String name,
IOContext context)
throws IOException
- Specified by:
createOutput
in class Directory
- Throws:
IOException
deleteFile
public void deleteFile(String name)
throws IOException
- Specified by:
deleteFile
in class Directory
- Throws:
IOException
fileExists
public boolean fileExists(String name)
throws IOException
- Specified by:
fileExists
in class Directory
- Throws:
IOException
fileLength
public long fileLength(String name)
throws IOException
- Specified by:
fileLength
in class Directory
- Throws:
IOException
listAll
public String[] listAll()
throws IOException
- Specified by:
listAll
in class Directory
- Throws:
IOException
getDirectory
public Directory getDirectory()
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.