public class DatabaseId extends BasicVersionedWriteLoggable implements Comparable<DatabaseId>
| Constructor and Description |
|---|
DatabaseId()
Uninitialized database id, for logging.
|
DatabaseId(long id) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(DatabaseId o)
see Comparable#compareTo
|
void |
dumpLog(StringBuilder sb,
boolean verbose)
Write the object into the string buffer for log dumping.
|
boolean |
equals(Object obj)
Compare two DatabaseImpl Id's.
|
byte[] |
getBytes() |
Collection<VersionedWriteLoggable> |
getEmbeddedLoggables() |
long |
getId() |
int |
getLastFormatChange()
Returns the log version of the most recent format change for this
loggable item.
|
int |
getLogSize(int logVersion,
boolean forReplication)
Returns the number of bytes needed to store this object in the format
for the specified log version.
|
long |
getTransactionId() |
int |
hashCode() |
boolean |
logicalEquals(Loggable other) |
void |
readFromLog(ByteBuffer itemBuffer,
int entryVersion)
Initialize this object from the data in itemBuf.
|
String |
toString() |
void |
writeToLog(ByteBuffer logBuffer,
int logVersion,
boolean forReplication)
Serializes this object into the specified buffer in the format for the
specified log version.
|
getLogSize, hasReplicationFormat, isReplicationFormatWorthwhile, writeToLogpublic DatabaseId(long id)
public DatabaseId()
public long getId()
public byte[] getBytes()
throws DatabaseException
DatabaseExceptionpublic boolean equals(Object obj)
public int compareTo(DatabaseId o)
compareTo in interface Comparable<DatabaseId>public int getLastFormatChange()
VersionedWriteLoggablegetLastFormatChange in interface VersionedWriteLoggableReplicableLogEntry.getLastFormatChange()public Collection<VersionedWriteLoggable> getEmbeddedLoggables()
getEmbeddedLoggables in interface VersionedWriteLoggableReplicableLogEntry.getEmbeddedLoggables()public int getLogSize(int logVersion,
boolean forReplication)
VersionedWriteLoggableLogEntryType.LOG_VERSION_REPLICATE_OLDER or greater.getLogSize in interface VersionedWriteLoggablelogVersion - the log versionforReplication - whether the entry will be sent over the wire,
and not written to the log.public void writeToLog(ByteBuffer logBuffer, int logVersion, boolean forReplication)
VersionedWriteLoggableLogEntryType.LOG_VERSION_REPLICATE_OLDER or greater.writeToLog in interface VersionedWriteLoggablelogBuffer - the destination bufferlogVersion - the log versionforReplication - whether the entry will be sent over the wire,
and not written to the log.public void readFromLog(ByteBuffer itemBuffer, int entryVersion)
LoggablereadFromLog in interface LoggableitemBuffer - the source bufferentryVersion - the log version of the datapublic void dumpLog(StringBuilder sb, boolean verbose)
Loggablepublic long getTransactionId()
getTransactionId in interface Loggablepublic boolean logicalEquals(Loggable other)
logicalEquals in interface LoggableCopyright © 2024. All rights reserved.