Home » lucene-3.0.1-src » org.apache » lucene » store » db » [javadoc | source]
org.apache.lucene.store.db
public class: DbDirectory [javadoc | source]
java.lang.Object
   org.apache.lucene.store.Directory
      org.apache.lucene.store.db.DbDirectory

All Implemented Interfaces:
    Closeable

A DbDirectory is a Berkeley DB 4.3 based implementation of Directory . It uses two Db database handles, one for storing file records and another for storing file data blocks.
Field Summary
protected  Set<DbIndexOutput> openFiles     
protected  Db files     
protected  Db blocks     
protected  DbTxn txn     
protected  int flags     
Fields inherited from org.apache.lucene.store.Directory:
isOpen,  lockFactory
Constructor:
 public DbDirectory(Transaction txn,
    Database files,
    Database blocks) 
 public DbDirectory(DbTxn txn,
    Db files,
    Db blocks,
    int flags) 
    Instantiate a DbDirectory. The same threading rules that apply to Berkeley DB handles apply to instances of DbDirectory.
    Parameters:
    txn - a transaction handle that is going to be used for all db operations done by this instance. This parameter may be null.
    files - a db handle to store file records.
    blocks - a db handle to store file data blocks.
    flags - flags used for db read operations.
 public DbDirectory(Transaction txn,
    Database files,
    Database blocks,
    int flags) 
Method from org.apache.lucene.store.db.DbDirectory Summary:
close,   createOutput,   deleteFile,   fileExists,   fileLength,   fileModified,   flush,   listAll,   makeLock,   openInput,   setTransaction,   setTransaction,   touchFile
Methods from org.apache.lucene.store.Directory:
clearLock,   close,   copy,   createOutput,   deleteFile,   ensureOpen,   fileExists,   fileLength,   fileModified,   getLockFactory,   getLockID,   listAll,   makeLock,   openInput,   openInput,   setLockFactory,   sync,   touchFile
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.store.db.DbDirectory Detail:
 public  void close() throws IOException 
 public IndexOutput createOutput(String name) throws IOException 
 public  void deleteFile(String name) throws IOException 
 public boolean fileExists(String name) throws IOException 
 public long fileLength(String name) throws IOException 
 public long fileModified(String name) throws IOException 
 public  void flush() throws IOException 
    Flush the currently open files. After they have been flushed it is safe to commit the transaction without closing this DbDirectory instance first.
 public String[] listAll() throws IOException 
 public Lock makeLock(String name) 
 public IndexInput openInput(String name) throws IOException 
 public  void setTransaction(Transaction txn) 
    Once a transaction handle was committed it is no longer valid. In order to continue using this DbDirectory instance after a commit, the transaction handle has to be replaced.
 public  void setTransaction(DbTxn txn) 
    Once a transaction handle was committed it is no longer valid. In order to continue using this DbDirectory instance after a commit, the transaction handle has to be replaced.
 public  void touchFile(String name) throws IOException