org.apache.blur.store.blockcache
Class BlockDirectory

java.lang.Object
  extended by org.apache.lucene.store.Directory
      extended by org.apache.blur.store.blockcache.BlockDirectory
All Implemented Interfaces:
Closeable, DirectoryDecorator

public class BlockDirectory
extends org.apache.lucene.store.Directory
implements DirectoryDecorator


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.store.Directory
org.apache.lucene.store.Directory.IndexInputSlicer
 
Field Summary
static long BLOCK_MOD
           
static long BLOCK_SHIFT
           
static int BLOCK_SIZE
           
static Cache NO_CACHE
           
 
Constructor Summary
BlockDirectory(String dirName, org.apache.lucene.store.Directory directory)
           
BlockDirectory(String dirName, org.apache.lucene.store.Directory directory, Cache cache)
           
BlockDirectory(String dirName, org.apache.lucene.store.Directory directory, Cache cache, Set<String> blockCacheFileTypes)
           
 
Method Summary
 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)
           
 org.apache.lucene.store.Directory getDirectory()
           
 org.apache.lucene.store.LockFactory getLockFactory()
           
 String getLockID()
           
 org.apache.lucene.store.Directory getOriginalDirectory()
           
static long getPosition(long pos)
           
static long getRealPosition(long block, long positionInBlock)
           
 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()
           
 
Methods inherited from class org.apache.lucene.store.Directory
createSlicer
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

BlockDirectory

public BlockDirectory(String dirName,
                      org.apache.lucene.store.Directory directory)
               throws IOException
Throws:
IOException

BlockDirectory

public BlockDirectory(String dirName,
                      org.apache.lucene.store.Directory directory,
                      Cache cache)
               throws IOException
Throws:
IOException

BlockDirectory

public BlockDirectory(String dirName,
                      org.apache.lucene.store.Directory directory,
                      Cache cache,
                      Set<String> blockCacheFileTypes)
               throws IOException
Throws:
IOException
Method Detail

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 org.apache.lucene.store.IndexInput openInput(String name,
                                                    org.apache.lucene.store.IOContext context)
                                             throws IOException
Specified by:
openInput in class org.apache.lucene.store.Directory
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class org.apache.lucene.store.Directory
Throws:
IOException

clearLock

public void clearLock(String name)
               throws IOException
Overrides:
clearLock in class org.apache.lucene.store.Directory
Throws:
IOException

copy

public void copy(org.apache.lucene.store.Directory to,
                 String src,
                 String dest,
                 org.apache.lucene.store.IOContext context)
          throws IOException
Overrides:
copy in class org.apache.lucene.store.Directory
Throws:
IOException

getLockFactory

public org.apache.lucene.store.LockFactory getLockFactory()
Overrides:
getLockFactory in class org.apache.lucene.store.Directory

getLockID

public String getLockID()
Overrides:
getLockID in class org.apache.lucene.store.Directory

makeLock

public org.apache.lucene.store.Lock makeLock(String name)
Overrides:
makeLock in class org.apache.lucene.store.Directory

setLockFactory

public void setLockFactory(org.apache.lucene.store.LockFactory lockFactory)
                    throws IOException
Overrides:
setLockFactory in class org.apache.lucene.store.Directory
Throws:
IOException

sync

public void sync(Collection<String> names)
          throws IOException
Specified by:
sync in class org.apache.lucene.store.Directory
Throws:
IOException

toString

public String toString()
Overrides:
toString in class org.apache.lucene.store.Directory

createOutput

public org.apache.lucene.store.IndexOutput createOutput(String name,
                                                        org.apache.lucene.store.IOContext context)
                                                 throws IOException
Specified by:
createOutput in class org.apache.lucene.store.Directory
Throws:
IOException

deleteFile

public void deleteFile(String name)
                throws IOException
Specified by:
deleteFile in class org.apache.lucene.store.Directory
Throws:
IOException

fileExists

public boolean fileExists(String name)
                   throws IOException
Specified by:
fileExists in class org.apache.lucene.store.Directory
Throws:
IOException

fileLength

public long fileLength(String name)
                throws IOException
Specified by:
fileLength in class org.apache.lucene.store.Directory
Throws:
IOException

listAll

public String[] listAll()
                 throws IOException
Specified by:
listAll in class org.apache.lucene.store.Directory
Throws:
IOException

getDirectory

public org.apache.lucene.store.Directory getDirectory()

getOriginalDirectory

public org.apache.lucene.store.Directory getOriginalDirectory()
Specified by:
getOriginalDirectory in interface DirectoryDecorator


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.