| Modifier and Type | Field and Description |
|---|---|
protected Db |
blocks |
protected Db |
files |
protected int |
flags |
protected Set |
openFiles |
protected DbTxn |
txn |
lockFactory| Constructor and Description |
|---|
DbDirectory(DbTxn txn,
Db files,
Db blocks,
int flags)
Instantiate a DbDirectory.
|
DbDirectory(Transaction txn,
Database files,
Database blocks) |
DbDirectory(Transaction txn,
Database files,
Database blocks,
int flags) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
IndexOutput |
createOutput(String name) |
void |
deleteFile(String name) |
boolean |
fileExists(String name) |
long |
fileLength(String name) |
long |
fileModified(String name) |
void |
flush()
Flush the currently open files.
|
String[] |
list() |
Lock |
makeLock(String name) |
IndexInput |
openInput(String name) |
void |
renameFile(String from,
String to) |
void |
setTransaction(DbTxn txn)
Once a transaction handle was committed it is no longer valid.
|
void |
setTransaction(Transaction txn)
Once a transaction handle was committed it is no longer valid.
|
void |
touchFile(String name) |
clearLock, copy, ensureOpen, getLockFactory, getLockID, openInput, setLockFactory, syncprotected Set openFiles
protected Db files
protected Db blocks
protected DbTxn txn
protected int flags
public DbDirectory(DbTxn txn,
Db files,
Db blocks,
int flags)
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)
public DbDirectory(Transaction txn,
Database files,
Database blocks)
public void close()
throws IOException
close in class DirectoryIOExceptionpublic void flush()
throws IOException
IOExceptionsetTransaction(Transaction)public IndexOutput createOutput(String name) throws IOException
createOutput in class DirectoryIOExceptionpublic void deleteFile(String name) throws IOException
deleteFile in class DirectoryIOExceptionpublic boolean fileExists(String name) throws IOException
fileExists in class DirectoryIOExceptionpublic long fileLength(String name) throws IOException
fileLength in class DirectoryIOExceptionpublic long fileModified(String name) throws IOException
fileModified in class DirectoryIOExceptionpublic String[] list() throws IOException
list in class DirectoryIOExceptionpublic IndexInput openInput(String name) throws IOException
openInput in class DirectoryIOExceptionpublic void renameFile(String from, String to) throws IOException
renameFile in class DirectoryIOExceptionpublic void touchFile(String name) throws IOException
touchFile in class DirectoryIOExceptionpublic void setTransaction(Transaction txn)
txn - the new transaction handle to usepublic void setTransaction(DbTxn txn)
txn - the new transaction handle to useCopyright © 2000-2013 Apache Software Foundation. All Rights Reserved.