com.sleepycat.je.dbi
Class DbTree

java.lang.Object
  extended by com.sleepycat.je.dbi.DbTree
All Implemented Interfaces:
Loggable

public class DbTree
extends Object
implements Loggable

DbTree represents the database directory for this environment. DbTree is itself implemented through two databases. The nameDatabase maps databaseName-> an internal databaseId. The idDatabase maps databaseId->DatabaseImpl. For example, suppose we have two databases, foo and bar. We have the following structure: nameDatabase idDatabase IN IN | | BIN BIN +-------------+--------+ +---------------+--------+ . | | . | | NameLNs NameLN NameLN MapLNs for MapLN MapLN for internal key=bar key=foo internal dbs key=53 key=79 dbs data= data= data= data= dbId79 dbId53 DatabaseImpl DatabaseImpl | | Tree for foo Tree for bar | | root IN root IN Databases, Cursors, the cleaner, compressor, and other entities have references to DatabaseImpls. It's important that object identity is properly maintained, and that all constituents reference the same DatabaseImpl for the same db, lest they develop disparate views of the in-memory database; corruption would ensue. To ensure that, all entities must obtain their DatabaseImpl by going through the idDatabase. DDL type operations such as create, rename, remove and truncate get their transactional semantics by transactionally locking the NameLN appropriately. A read-lock on the NameLN, called a handle lock, is maintained for all DBs opened via the public API (openDatabase). This prevents them from being renamed or removed while open. See HandleLocker for details. However, for internal database operations, no handle lock on the NameLN is acquired and MapLNs are locked with short-lived non-transactional Lockers. An entity that is trying to get a reference to the DatabaseImpl gets a short lived read lock just for the fetch of the MapLN, and a DatabaseImpl usage count is incremented to prevent eviction; see getDb and releaseDb. A write lock on the MapLN is taken when the database is created, deleted, or when the MapLN is evicted. (see DatabaseImpl.isInUse()) The nameDatabase operates pretty much as a regular application database in terms of eviction and recovery. The idDatabase requires special treatment for both eviction and recovery. The issues around eviction of the idDatabase center on the need to ensure that there are no other current references to the DatabaseImpl other than that held by the mapLN. The presence of a current reference would both make the DatabaseImpl not GC'able, and more importantly, would lead to object identity confusion later on. For example, if the MapLN is evicted while there is a current reference to its DatabaseImpl, and then refetched, there will be two in-memory versions of the DatabaseImpl. Since locks on the idDatabase are short lived, DatabaseImpl.useCount acts as a reference count of active current references. DatabaseImpl.useCount must be modified and read in conjunction with appropriate locking on the MapLN. See DatabaseImpl.isInUse() for details. This reference count checking is only needed when the entire MapLN is evicted. It's possible to evict only the root IN of the database in question, since that doesn't interfere with the DatabaseImpl object identity. Another dependency on usage counts was introduced to prevent MapLN deletion during cleaner and checkpointer operations that are processing entries for a DB. (Without usage counts, this problem would have occurred even if DB eviction were never implemented.) When the usage count is non-zero it prohibits deleteMapLN from running. The deleted state of the MapLN must not change during a reader operation (operation by a thread that has called getDb and not yet called releaseDb). Why not just hold a MapLN read lock during a reader operation? -------------------------------------------------------------- Originally this was not done because of cleaner performance. We afraid that * either of the following solutions would not perform well: + If we get (and release) a MapLN lock for every entry in a log file, this adds a lot of per-entry overhead. + If we hold the MapLN read lock for the duration of a log file cleaning (the assumption is that many entries are for the same DB), then we block checkpoints during that period, when they call modifyDbRoot. Therefore, the usage count is incremented once per DB encountered during log cleaning, and the count is decremented at the end. This caching approach is also used by the HA replayer. In both cases, we do not want to lock the MapLN every entry/operation, and we do not want to block checkpoints or other callers of modifyDbRoot. It is acceptable, however, to block DB naming operations. In addition we allow modifyDbRoot to run when even the usage count is non-zero, which would not be possible using a read-write locking strategy. I'm not sure why this was done originally, perhaps to avoid blocking. But currently, it is necessary to prevent a self-deadlock. All callers of modifyDbRoot first call getDb, which increments the usage count. So if modifyDbRoot was to check the usage count and retry if non-zero (like deleteMapLN), then it would loop forever. Why are the retry loops necessary in the DbTree methods? -------------------------------------------------------- Three methods that access the MapLN perform retries (forever) when there is a lock conflict: getDb, modifyDbRoot and deleteMapLN. Initially the retry loops were added to compensate for certain slow operations. To solve that problem, perhaps there are alternative solutions (increasing the lock timeout). However, the deleteMapLN retry loop is necessary to avoid deleting it when the DB is in use by reader operations. Tendency to livelock -------------------- Because MapLN locks are short lived, but a reader operation may hold a MapLN/DatabaseImpl for a longer period by incrementing the usage count, there is the possibility of livelock. One strategy for avoiding livelock is to avoid algorithms where multiple threads continuously call getDb and releaseDb, since this could prevent completion of deleteMapLN. [#20816]


Nested Class Summary
(package private) static interface DbTree.GetRepContext
          Used by lockNameLN to get the rep context, which is needed for calling checkReplicaWrite.
static class DbTree.TruncateDbResult
           
 
Field Summary
static DatabaseId ID_DB_ID
           
static DatabaseId NAME_DB_ID
           
static long NEG_DB_ID_START
           
 
Constructor Summary
DbTree()
          Create a dbTree from the log.
DbTree(EnvironmentImpl env, boolean replicationIntended, boolean preserveVLSN)
          Create a new dbTree for a new environment.
 
Method Summary
 void close()
          Release resources and update memory budget.
 DatabaseImpl createDb(Locker locker, String databaseName, DatabaseConfig dbConfig, HandleLocker handleLocker)
          Creates a new database object given a database name.
 DatabaseImpl createInternalDb(Locker locker, String databaseName, DatabaseConfig dbConfig)
          Create a database for internal use.
 DatabaseImpl createReplicaDb(Locker locker, String databaseName, DatabaseConfig dbConfig, NameLN replicatedLN, ReplicationContext repContext)
          Create a replicated database on this client node.
 DatabaseImpl dbRemove(Locker locker, String databaseName, DatabaseId checkId)
          Stand alone and Master invocations.
 DatabaseImpl dbRename(Locker locker, String databaseName, String newName)
          Stand alone and Master invocations.
(package private)  void deleteMapLN(DatabaseId id)
           
 DbTree.TruncateDbResult doTruncateDb(Locker locker, String databaseName, boolean returnCount, NameLN replicatedLN, DbOpReplicationContext repContext)
          To truncate, remove the database named by databaseName and create a new database in its place.
 void dump()
          For debugging.
 void dumpLog(StringBuilder sb, boolean verbose)
          Write the object into the string buffer for log dumping.
(package private)  String dumpString(int nSpaces)
           
 DatabaseImpl getDb(DatabaseId dbId)
          Get a database object based on an id only.
 DatabaseImpl getDb(DatabaseId dbId, long lockTimeout)
          Get a database object based on an id only.
 DatabaseImpl getDb(DatabaseId dbId, long lockTimeout, Map<DatabaseId,DatabaseImpl> dbCache)
          Get a database object based on an id only, caching the id-db mapping in the given map.
 DatabaseImpl getDb(DatabaseId dbId, long lockTimeout, String dbNameIfAvailable)
          Get a database object based on an id only.
 DatabaseImpl getDb(Locker nameLocker, String databaseName, HandleLocker handleLocker)
          Get a database object given a database name.
 String getDbName(DatabaseId id)
          Return the database name for a given db.
 List<String> getDbNames()
           
 Map<DatabaseId,String> getDbNamesAndIds()
           
(package private)  boolean getDupsConverted()
           
 int getHighestLevel()
           
 int getHighestLevel(DatabaseImpl dbImpl)
           
 DatabaseImpl getIdDatabaseImpl()
           
 List<String> getInternalNoLookupDbNames()
          Return a list of the names of internally used databases that don't get looked up through the naming tree.
 List<String> getInternalNoRepDbNames()
          Return a list of the names of internally used databases for all environment types.
 List<String> getInternalRepDbNames()
          Return a list of the names of internally used databases for replication only.
 long getLastLocalDbId()
          The last allocated local and replicated db ids are used for ckpts.
 long getLastReplicatedDbId()
           
 int getLogSize()
           
 long getTransactionId()
           
(package private)  long getTreeAdminMemory()
           
(package private)  void initExistingEnvironment(EnvironmentImpl eImpl)
          Initialize the db tree during recovery, after instantiating the tree from the log.
(package private)  boolean isRepConverted()
           
(package private)  boolean isReplicated()
           
static boolean isReservedDbName(String name)
          Returns true if the name is a reserved JE database name.
 boolean logicalEquals(Loggable other)
           
 void modifyDbRoot(DatabaseImpl db)
          Write the MapLN to disk.
 void modifyDbRoot(DatabaseImpl db, long ifBeforeLsn, boolean mustExist)
          Write a MapLN to the log in order to: - propagate a root change - save per-db utilization information - save database config information.
 void optionalModifyDbRoot(DatabaseImpl db)
          Check deferred write settings before writing the MapLN.
 void readFromLog(ByteBuffer itemBuffer, int entryVersion)
          Initialize this object from the data in itemBuf.
 void rebuildINListMapDb()
          Rebuild the IN list after recovery.
 void releaseDb(DatabaseImpl db)
          Decrements the use count of the given DB, allowing it to be evicted if the use count reaches zero.
 void releaseDbs(Map<DatabaseId,DatabaseImpl> dbCache)
          Calls releaseDb for all DBs in the given map of DatabaseId to DatabaseImpl.
 void removeReplicaDb(Locker locker, String databaseName, DatabaseId checkId, DbOpReplicationContext repContext)
          Replica invocations.
 DatabaseImpl renameReplicaDb(Locker locker, String databaseName, String newName, NameLN replicatedLN, DbOpReplicationContext repContext)
          Replica invocations.
(package private)  void setDupsConverted()
           
(package private)  void setIsRepConverted()
           
(package private)  void setIsReplicated()
           
 void setLastDbId(long lastReplicatedDbId, long lastLocalDbId)
          Initialize the db ids, from recovery.
 String toString()
           
 DbTree.TruncateDbResult truncate(Locker locker, String databaseName, boolean returnCount)
           
 DbTree.TruncateDbResult truncateReplicaDb(Locker locker, String databaseName, boolean returnCount, NameLN replicatedLN, DbOpReplicationContext repContext)
           
static DbType typeForDbName(String dbName)
          Returns the DbType for a given DB name.
 void updateFromReplay(DatabaseId replayDbId)
           
 void updateNameLN(Locker locker, String dbName, DbOpReplicationContext repContext)
          Update the NameLN for the DatabaseImpl when the DatabaseConfig changes.
 boolean verify(VerifyConfig config, PrintStream out)
           
 void writeToLog(ByteBuffer logBuffer)
          This log entry type is configured to perform marshaling (getLogSize and writeToLog) under the write log mutex.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ID_DB_ID

public static final DatabaseId ID_DB_ID

NAME_DB_ID

public static final DatabaseId NAME_DB_ID

NEG_DB_ID_START

public static final long NEG_DB_ID_START
See Also:
Constant Field Values
Constructor Detail

DbTree

public DbTree()
Create a dbTree from the log.


DbTree

public DbTree(EnvironmentImpl env,
              boolean replicationIntended,
              boolean preserveVLSN)
       throws DatabaseException
Create a new dbTree for a new environment.

Throws:
DatabaseException
Method Detail

typeForDbName

public static DbType typeForDbName(String dbName)
Returns the DbType for a given DB name. Note that we allow dbName to be null, because it may be null when the 'debug database name' is not yet known to DatabaseImpl. This works because the debug name is always known immediately for internal DBs.


getLastLocalDbId

public long getLastLocalDbId()
The last allocated local and replicated db ids are used for ckpts.


getLastReplicatedDbId

public long getLastReplicatedDbId()

setLastDbId

public void setLastDbId(long lastReplicatedDbId,
                        long lastLocalDbId)
Initialize the db ids, from recovery.


updateFromReplay

public void updateFromReplay(DatabaseId replayDbId)

initExistingEnvironment

void initExistingEnvironment(EnvironmentImpl eImpl)
                       throws DatabaseException
Initialize the db tree during recovery, after instantiating the tree from the log. a. set up references to the environment impl b. check for replication rules.

Throws:
DatabaseException

createDb

public DatabaseImpl createDb(Locker locker,
                             String databaseName,
                             DatabaseConfig dbConfig,
                             HandleLocker handleLocker)
                      throws DatabaseException
Creates a new database object given a database name. Increments the use count of the new DB to prevent it from being evicted. releaseDb should be called when the returned object is no longer used, to allow it to be evicted. See DatabaseImpl.isInUse. [#13415]

Throws:
DatabaseException

createInternalDb

public DatabaseImpl createInternalDb(Locker locker,
                                     String databaseName,
                                     DatabaseConfig dbConfig)
                              throws DatabaseException
Create a database for internal use. It may or may not be replicated. Since DatabaseConfig.replicated is true by default, be sure to set it to false if this is a internal, not replicated database.

Throws:
DatabaseException

createReplicaDb

public DatabaseImpl createReplicaDb(Locker locker,
                                    String databaseName,
                                    DatabaseConfig dbConfig,
                                    NameLN replicatedLN,
                                    ReplicationContext repContext)
                             throws DatabaseException
Create a replicated database on this client node.

Throws:
DatabaseException

optionalModifyDbRoot

public void optionalModifyDbRoot(DatabaseImpl db)
                          throws DatabaseException
Check deferred write settings before writing the MapLN.

Parameters:
db - the database represented by this MapLN
Throws:
DatabaseException

modifyDbRoot

public void modifyDbRoot(DatabaseImpl db)
                  throws DatabaseException
Write the MapLN to disk.

Parameters:
db - the database represented by this MapLN
Throws:
DatabaseException

modifyDbRoot

public void modifyDbRoot(DatabaseImpl db,
                         long ifBeforeLsn,
                         boolean mustExist)
                  throws DatabaseException
Write a MapLN to the log in order to: - propagate a root change - save per-db utilization information - save database config information. Any MapLN writes must be done through this method, in order to ensure that the root latch is taken, and updates to the rootIN are properly safeguarded. See MapN.java for more detail.

Parameters:
db - the database whose root is held by this MapLN
ifBeforeLsn - if argument is not NULL_LSN, only do the write if this MapLN's current LSN is before isBeforeLSN.
mustExist - if true, throw DatabaseException if the DB does not exist; if false, silently do nothing.
Throws:
DatabaseException

updateNameLN

public void updateNameLN(Locker locker,
                         String dbName,
                         DbOpReplicationContext repContext)
                  throws LockConflictException
Update the NameLN for the DatabaseImpl when the DatabaseConfig changes. JE MapLN actually includes the DatabaseImpl information, but it is not transactional, so the DatabaseConfig information is stored in NameLNLogEntry and replicated. So when there is a DatabaseConfig changes, we'll update the NameLN for the database, which will log a new NameLNLogEntry so that the rep stream will transfer it to the replicas and it will be replayed.

Parameters:
locker - the locker used to update the NameLN
dbName - the name of the database whose corresponding NameLN needs to be updated
repContext - information used while replaying a NameLNLogEntry on the replicas, it's null on master
Throws:
LockConflictException

dbRename

public DatabaseImpl dbRename(Locker locker,
                             String databaseName,
                             String newName)
                      throws DatabaseNotFoundException
Stand alone and Master invocations.

Throws:
DatabaseNotFoundException
See Also:
doRenameDb(com.sleepycat.je.txn.Locker, java.lang.String, java.lang.String, com.sleepycat.je.tree.NameLN, com.sleepycat.je.log.DbOpReplicationContext)

renameReplicaDb

public DatabaseImpl renameReplicaDb(Locker locker,
                                    String databaseName,
                                    String newName,
                                    NameLN replicatedLN,
                                    DbOpReplicationContext repContext)
                             throws DatabaseNotFoundException
Replica invocations.

Throws:
DatabaseNotFoundException
See Also:
doRenameDb(com.sleepycat.je.txn.Locker, java.lang.String, java.lang.String, com.sleepycat.je.tree.NameLN, com.sleepycat.je.log.DbOpReplicationContext)

dbRemove

public DatabaseImpl dbRemove(Locker locker,
                             String databaseName,
                             DatabaseId checkId)
                      throws DatabaseNotFoundException
Stand alone and Master invocations.

Throws:
DatabaseNotFoundException
See Also:
doRemoveDb(com.sleepycat.je.txn.Locker, java.lang.String, com.sleepycat.je.dbi.DatabaseId, com.sleepycat.je.log.DbOpReplicationContext)

removeReplicaDb

public void removeReplicaDb(Locker locker,
                            String databaseName,
                            DatabaseId checkId,
                            DbOpReplicationContext repContext)
                     throws DatabaseNotFoundException
Replica invocations.

Throws:
DatabaseNotFoundException
See Also:
doRemoveDb(com.sleepycat.je.txn.Locker, java.lang.String, com.sleepycat.je.dbi.DatabaseId, com.sleepycat.je.log.DbOpReplicationContext)

doTruncateDb

public DbTree.TruncateDbResult doTruncateDb(Locker locker,
                                            String databaseName,
                                            boolean returnCount,
                                            NameLN replicatedLN,
                                            DbOpReplicationContext repContext)
                                     throws DatabaseNotFoundException
To truncate, remove the database named by databaseName and create a new database in its place. Do not evict (do not call CursorImpl.setAllowEviction(true)) during low level DbTree operation. [#15176]

Parameters:
returnCount - if true, must return the count of records in the database, which can be an expensive option.
Returns:
the record count, oldDb and newDb packaged in a TruncateDbResult
Throws:
DatabaseNotFoundException - if the operation fails because the given DB name is not found.

truncate

public DbTree.TruncateDbResult truncate(Locker locker,
                                        String databaseName,
                                        boolean returnCount)
                                 throws DatabaseNotFoundException
Throws:
DatabaseNotFoundException
See Also:
doTruncateDb(com.sleepycat.je.txn.Locker, java.lang.String, boolean, com.sleepycat.je.tree.NameLN, com.sleepycat.je.log.DbOpReplicationContext)

truncateReplicaDb

public DbTree.TruncateDbResult truncateReplicaDb(Locker locker,
                                                 String databaseName,
                                                 boolean returnCount,
                                                 NameLN replicatedLN,
                                                 DbOpReplicationContext repContext)
                                          throws DatabaseNotFoundException
Throws:
DatabaseNotFoundException
See Also:
doTruncateDb(com.sleepycat.je.txn.Locker, java.lang.String, boolean, com.sleepycat.je.tree.NameLN, com.sleepycat.je.log.DbOpReplicationContext)

deleteMapLN

void deleteMapLN(DatabaseId id)
           throws DatabaseException
Throws:
DatabaseException

getDb

public DatabaseImpl getDb(Locker nameLocker,
                          String databaseName,
                          HandleLocker handleLocker)
                   throws DatabaseException
Get a database object given a database name. Increments the use count of the given DB to prevent it from being evicted. releaseDb should be called when the returned object is no longer used, to allow it to be evicted. See DatabaseImpl.isInUse. [#13415] Do not evict (do not call CursorImpl.setAllowEviction(true)) during low level DbTree operation. [#15176]

Parameters:
nameLocker - is used to access the NameLN. As always, a NullTxn is used to access the MapLN.
databaseName - target database
Returns:
null if database doesn't exist
Throws:
DatabaseException

getDb

public DatabaseImpl getDb(DatabaseId dbId)
                   throws DatabaseException
Get a database object based on an id only. Used by recovery, cleaning and other clients who have an id in hand, and don't have a resident node, to find the matching database for a given log entry.

Throws:
DatabaseException

getDb

public DatabaseImpl getDb(DatabaseId dbId,
                          long lockTimeout)
                   throws DatabaseException
Get a database object based on an id only. Specify the lock timeout to use, or -1 to use the default timeout. A timeout should normally only be specified by daemons with their own timeout configuration. public for unit tests.

Throws:
DatabaseException

getDb

public DatabaseImpl getDb(DatabaseId dbId,
                          long lockTimeout,
                          Map<DatabaseId,DatabaseImpl> dbCache)
                   throws DatabaseException
Get a database object based on an id only, caching the id-db mapping in the given map.

Throws:
DatabaseException

getDb

public DatabaseImpl getDb(DatabaseId dbId,
                          long lockTimeout,
                          String dbNameIfAvailable)
                   throws DatabaseException
Get a database object based on an id only. Specify the lock timeout to use, or -1 to use the default timeout. A timeout should normally only be specified by daemons with their own timeout configuration. public for unit tests. Increments the use count of the given DB to prevent it from being evicted. releaseDb should be called when the returned object is no longer used, to allow it to be evicted. See DatabaseImpl.isInUse. [#13415] Do not evict (do not call CursorImpl.setAllowEviction(true)) during low level DbTree operation. [#15176]

Throws:
DatabaseException

releaseDb

public void releaseDb(DatabaseImpl db)
Decrements the use count of the given DB, allowing it to be evicted if the use count reaches zero. Must be called to release a DatabaseImpl that was returned by a method in this class. See DatabaseImpl.isInUse. [#13415]


releaseDbs

public void releaseDbs(Map<DatabaseId,DatabaseImpl> dbCache)
Calls releaseDb for all DBs in the given map of DatabaseId to DatabaseImpl. See getDb(DatabaseId, long, Map). [#13415]


rebuildINListMapDb

public void rebuildINListMapDb()
                        throws DatabaseException
Rebuild the IN list after recovery.

Throws:
DatabaseException

verify

public boolean verify(VerifyConfig config,
                      PrintStream out)
               throws DatabaseException
Throws:
DatabaseException

getDbName

public String getDbName(DatabaseId id)
                 throws DatabaseException
Return the database name for a given db. Slow, must traverse. Called by Database.getName. Do not evict (do not call CursorImpl.setAllowEviction(true)) during low level DbTree operation. [#15176]

Throws:
DatabaseException

getDbNamesAndIds

public Map<DatabaseId,String> getDbNamesAndIds()
                                        throws DatabaseException
Returns:
a map of database ids to database names (Strings).
Throws:
DatabaseException

getDbNames

public List<String> getDbNames()
                        throws DatabaseException
Returns:
a list of database names held in the environment, as strings.
Throws:
DatabaseException

getInternalNoLookupDbNames

public List<String> getInternalNoLookupDbNames()
Return a list of the names of internally used databases that don't get looked up through the naming tree.


getInternalNoRepDbNames

public List<String> getInternalNoRepDbNames()
Return a list of the names of internally used databases for all environment types.


getInternalRepDbNames

public List<String> getInternalRepDbNames()
Return a list of the names of internally used databases for replication only.


isReservedDbName

public static boolean isReservedDbName(String name)
Returns true if the name is a reserved JE database name.


getHighestLevel

public int getHighestLevel()
                    throws DatabaseException
Returns:
the higest level node in the environment.
Throws:
DatabaseException

getHighestLevel

public int getHighestLevel(DatabaseImpl dbImpl)
                    throws DatabaseException
Returns:
the higest level node for this database.
Throws:
DatabaseException

isReplicated

boolean isReplicated()

setIsReplicated

void setIsReplicated()

isRepConverted

boolean isRepConverted()

setIsRepConverted

void setIsRepConverted()

getIdDatabaseImpl

public DatabaseImpl getIdDatabaseImpl()

getDupsConverted

boolean getDupsConverted()

setDupsConverted

void setDupsConverted()

close

public void close()
Release resources and update memory budget. Should only be called when this dbtree is closed and will never be accessed again.


getTreeAdminMemory

long getTreeAdminMemory()

getLogSize

public int getLogSize()
Specified by:
getLogSize in interface Loggable
Returns:
number of bytes used to store this object.
See Also:
Loggable.getLogSize()

writeToLog

public void writeToLog(ByteBuffer logBuffer)
This log entry type is configured to perform marshaling (getLogSize and writeToLog) under the write log mutex. Otherwise, the size could change in between calls to these two methods as the result of utilizaton tracking.

Specified by:
writeToLog in interface Loggable
Parameters:
logBuffer - is the destination buffer
See Also:
Loggable.writeToLog(java.nio.ByteBuffer)

readFromLog

public void readFromLog(ByteBuffer itemBuffer,
                        int entryVersion)
Description copied from interface: Loggable
Initialize this object from the data in itemBuf.

Specified by:
readFromLog in interface Loggable
See Also:
Loggable.readFromLog(java.nio.ByteBuffer, int)

dumpLog

public void dumpLog(StringBuilder sb,
                    boolean verbose)
Description copied from interface: Loggable
Write the object into the string buffer for log dumping. Each object should be dumped without indentation or new lines and should be valid XML.

Specified by:
dumpLog in interface Loggable
Parameters:
sb - destination string buffer
verbose - if true, dump the full, verbose version
See Also:
Loggable.dumpLog(java.lang.StringBuilder, boolean)

getTransactionId

public long getTransactionId()
Specified by:
getTransactionId in interface Loggable
Returns:
the transaction id embedded within this loggable object. Objects that have no transaction id should return 0.
See Also:
Loggable.getTransactionId()

logicalEquals

public boolean logicalEquals(Loggable other)
Specified by:
logicalEquals in interface Loggable
Returns:
true if these two loggable items are logically the same. Used for replication testing.
See Also:
Always return false, this item should never be compared.

dumpString

String dumpString(int nSpaces)

toString

public String toString()
Overrides:
toString in class Object

dump

public void dump()
For debugging.



Copyright (c) 2004-2012 Oracle. All rights reserved.