|
|||||||||
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. |
(package private) long |
countRecords()
Return the count of nodes in the database. |
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. |
(package private) void |
finishedINListHarvest()
|
int |
getAdditionalMemorySize()
Returns the memory size that should be added to MAPLN_OVERHEAD. |
int |
getBinDeltaPercent()
|
int |
getBinMaxDeltas()
|
Comparator |
getBtreeComparator()
|
boolean |
getBtreeComparatorByClass()
|
EnvironmentImpl |
getDbEnvironment()
|
String |
getDebugName()
|
Comparator |
getDuplicateComparator()
|
boolean |
getDuplicateComparatorByClass()
|
DatabaseStats |
getEmptyStats()
|
long |
getEofNodeId()
|
DatabaseId |
getId()
|
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. |
static Comparator |
instantiateComparator(Comparator comparator,
String comparatorType)
Used to validate a comparator when set in DatabaseConfig. |
boolean |
isDeferredWrite()
|
boolean |
isDeleted()
|
boolean |
isDeleteFinished()
|
boolean |
isTransactional()
|
boolean |
logEntryIsTransactional()
|
static byte[] |
objectToBytes(Object obj,
String comparatorType)
Converts an arbitrary object to a serialized byte array. |
PreloadStats |
preload(PreloadConfig config)
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. |
void |
releaseDeletedINs()
|
void |
removeReferringHandle(Database db)
Decrement the reference count. |
void |
setBtreeComparator(Comparator comparator,
boolean byClassName)
Set the btree comparison function for this database. |
void |
setDebugDatabaseName(String debugName)
|
void |
setDeferredWrite(boolean deferredWrite)
|
void |
setDuplicateComparator(Comparator comparator,
boolean byClassName)
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 |
setPendingDeletedHook(TestHook hook)
|
void |
setTransactional(boolean transactional)
Sets the transactional property for the first opened handle. |
(package private) void |
setTree(Tree tree)
|
void |
startDeleteProcessing()
|
DatabaseStats |
stat(StatsConfig config)
|
void |
sync()
Flush all dirty nodes for this database to disk. |
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 void setPendingDeletedHook(TestHook hook)
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 isDeferredWrite()
public void setDeferredWrite(boolean deferredWrite)
public boolean getSortedDuplicates()
public int getNodeMaxEntries()
public int getNodeMaxDupTreeEntries()
public int getAdditionalMemorySize()
public void setDuplicateComparator(Comparator comparator, boolean byClassName) throws DatabaseException
duplicateComparator
- - The Duplicate Comparison function.
DatabaseException
public void setBtreeComparator(Comparator comparator, boolean byClassName) throws DatabaseException
btreeComparator
- - The btree Comparison function.
DatabaseException
public Comparator getBtreeComparator()
public Comparator getDuplicateComparator()
public boolean getBtreeComparatorByClass()
public boolean getDuplicateComparatorByClass()
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 void sync() throws DatabaseException
DatabaseException
public Database findPrimaryDatabase() throws DatabaseException
DatabaseException
public String getName() throws DatabaseException
DatabaseException
public boolean isDeleted()
public boolean isDeleteFinished()
public void startDeleteProcessing()
void finishedINListHarvest()
public void deleteAndReleaseINs() throws DatabaseException
DatabaseException
public void releaseDeletedINs() throws DatabaseException
DatabaseException
public void checkIsDeleted(String operation) throws DatabaseException
DatabaseException
long countRecords() 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 PreloadStats preload(PreloadConfig config) 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 Comparator instantiateComparator(Class comparator, String comparatorType) throws LogException
LogException
public static Comparator instantiateComparator(Comparator comparator, String comparatorType) throws DatabaseException
DatabaseException
public static byte[] objectToBytes(Object obj, 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 |