|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.dbi.DatabaseImpl
public class DatabaseImpl
The underlying object for a given database.
Nested Class Summary | |
---|---|
(package private) static class |
DatabaseImpl.StatsAccumulator
|
Constructor Summary | |
---|---|
DatabaseImpl()
Create an empty database object for initialization from the log. |
|
DatabaseImpl(String dbName,
DatabaseId id,
EnvironmentImpl envImpl,
DatabaseConfig dbConfig)
Create a database object for a new database. |
Method Summary | |
---|---|
void |
addReferringHandle(Database db)
Add a referring handle |
void |
checkIsDeleted(String operation)
|
Object |
clone()
Clone. |
void |
deleteAndReleaseINs()
Purge a DatabaseImpl and corresponding MapLN in the db mapping tree. |
void |
dumpLog(StringBuffer sb,
boolean verbose)
Write the object into the string buffer for log dumping. |
String |
dumpString(int nSpaces)
|
Database |
findPrimaryDatabase()
For this secondary database return the primary that it is associated with, or null if not associated with any primary. |
int |
getBinDeltaPercent()
|
int |
getBinMaxDeltas()
|
Comparator |
getBtreeComparator()
|
EnvironmentImpl |
getDbEnvironment()
|
String |
getDebugName()
|
Comparator |
getDuplicateComparator()
|
DatabaseStats |
getEmptyStats()
|
long |
getEofNodeId()
|
DatabaseId |
getId()
|
boolean |
getIsDeleted()
|
int |
getLogSize()
|
String |
getName()
|
int |
getNodeMaxDupTreeEntries()
|
int |
getNodeMaxEntries()
|
(package private) int |
getReferringHandleCount()
|
boolean |
getSortedDuplicates()
|
long |
getTransactionId()
|
Tree |
getTree()
|
boolean |
hasOpenHandles()
Returns whether one or more handles are open. |
static Comparator |
instantiateComparator(Class comparator,
String comparatorType)
Used both to read from the log and to validate a comparator when set in DatabaseConfig. |
boolean |
isTransactional()
|
boolean |
logEntryIsTransactional()
|
void |
preload(long maxBytes,
long maxMillisecs)
Preload the cache, using up to maxBytes bytes or maxMillsecs msec. |
void |
readFromLog(ByteBuffer itemBuffer,
byte entryTypeVersion)
Initialize this object from the data in itemBuf. |
int |
recordObsoleteNodes()
Called when this database is truncated or removed to record the number of obsolete nodes that should be counted for the deleted tree. |
void |
removeReferringHandle(Database db)
Decrement the reference count. |
static String |
serializeComparator(Comparator comparator)
Used both to write to the log and to validate a comparator when set in DatabaseConfig. |
void |
setBtreeComparator(Comparator btreeComparator)
Set the btree comparison function for this database. |
void |
setDebugDatabaseName(String debugName)
|
void |
setDuplicateComparator(Comparator duplicateComparator)
Set the duplicate comparison function for this database. |
void |
setEnvironmentImpl(EnvironmentImpl envImpl)
Set the db environment during recovery, after instantiating the database from the log |
(package private) void |
setId(DatabaseId id)
|
void |
setTransactional(boolean transactional)
Sets the transactional property for the first opened handle. |
(package private) void |
setTree(Tree tree)
|
DatabaseStats |
stat(StatsConfig config)
|
boolean |
verify(VerifyConfig config,
DatabaseStats emptyStats)
|
void |
writeToLog(ByteBuffer logBuffer)
Serialize this object into the buffer. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatabaseImpl(String dbName, DatabaseId id, EnvironmentImpl envImpl, DatabaseConfig dbConfig) throws DatabaseException
DatabaseException
public DatabaseImpl() throws DatabaseException
DatabaseException
Method Detail |
---|
public void setDebugDatabaseName(String debugName)
public String getDebugName()
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public Tree getTree()
void setTree(Tree tree)
public DatabaseId getId()
void setId(DatabaseId id)
public long getEofNodeId()
public boolean isTransactional()
public void setTransactional(boolean transactional)
public boolean getSortedDuplicates()
public int getNodeMaxEntries()
public int getNodeMaxDupTreeEntries()
public void setDuplicateComparator(Comparator duplicateComparator)
duplicateComparator
- - The Duplicate Comparison function.public void setBtreeComparator(Comparator btreeComparator)
btreeComparator
- - The btree Comparison function.public Comparator getBtreeComparator()
public Comparator getDuplicateComparator()
public void setEnvironmentImpl(EnvironmentImpl envImpl) throws DatabaseException
DatabaseException
public EnvironmentImpl getDbEnvironment()
public boolean hasOpenHandles()
public void addReferringHandle(Database db)
public void removeReferringHandle(Database db)
int getReferringHandleCount()
public Database findPrimaryDatabase() throws DatabaseException
DatabaseException
public String getName() throws DatabaseException
DatabaseException
public boolean getIsDeleted()
public void deleteAndReleaseINs() throws DatabaseException
DatabaseException
public void checkIsDeleted(String operation) throws DatabaseException
DatabaseException
public int recordObsoleteNodes() throws DatabaseException
DatabaseException
public DatabaseStats stat(StatsConfig config) throws DatabaseException
DatabaseException
public boolean verify(VerifyConfig config, DatabaseStats emptyStats) throws DatabaseException
DatabaseException
public DatabaseStats getEmptyStats()
public void preload(long maxBytes, long maxMillisecs) throws DatabaseException
DatabaseException
public String dumpString(int nSpaces)
public int getLogSize()
getLogSize
in interface LogWritable
LogWritable.getLogSize()
public void writeToLog(ByteBuffer logBuffer)
LogWritable
writeToLog
in interface LogWritable
logBuffer
- is the destination bufferLogWritable.writeToLog(java.nio.ByteBuffer)
public void readFromLog(ByteBuffer itemBuffer, byte entryTypeVersion) throws LogException
LogReadable
readFromLog
in interface LogReadable
LogException
LogReadable.readFromLog(java.nio.ByteBuffer, byte)
public void dumpLog(StringBuffer sb, boolean verbose)
LogReadable
dumpLog
in interface LogReadable
sb
- destination string bufferverbose
- if true, dump the full, verbose versionLogReadable.dumpLog(java.lang.StringBuffer, boolean)
public boolean logEntryIsTransactional()
logEntryIsTransactional
in interface LogReadable
LogReadable.logEntryIsTransactional()
public long getTransactionId()
getTransactionId
in interface LogReadable
LogReadable.getTransactionId()
public static String serializeComparator(Comparator comparator)
public static Comparator instantiateComparator(Class comparator, String comparatorType) throws LogException
LogException
public int getBinDeltaPercent()
public int getBinMaxDeltas()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |