java.io.Externalizable
, java.io.Serializable
, Formatable
, TypedFormat
, DatabaseInstant
, LogInstant
public class LogCounter extends java.lang.Object implements LogInstant
Modifier and Type | Field | Description |
---|---|---|
static long |
DERBY_10_0_MAX_LOGFILE_NUMBER |
|
private static long |
FILE_NUMBER_SHIFT |
|
private static long |
FILE_POSITION_MASK |
|
private long |
fileNumber |
|
private long |
filePosition |
|
static long |
INVALID_LOG_INSTANT |
A well defined value of an invalid log instant.
|
static long |
MAX_LOGFILE_NUMBER |
|
static long |
MAX_LOGFILE_SIZE |
Constructor | Description |
---|---|
LogCounter() |
Public niladic constructor needed for Formatable interface.
|
LogCounter(long value) |
|
LogCounter(long fileNumber,
long position) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object other) |
Return true if this DatabaseInstant equals
DatabaseInstant from the same database.
|
long |
getLogFileNumber() |
|
static long |
getLogFileNumber(long valueAsLong) |
|
long |
getLogFilePosition() |
|
static long |
getLogFilePosition(long valueAsLong) |
|
int |
getTypeFormatId() |
Get the formatID which corresponds to this class.
|
long |
getValueAsLong() |
These following methods are only intended to be called by an
implementation of a log factory.
|
int |
hashCode() |
|
boolean |
lessThan(DatabaseInstant other) |
LogScan methods
|
static long |
makeLogInstantAsLong(long filenum,
long filepos) |
Static functions that can only be used inside the RawStore's log
factory which passes the log counter around encoded as a long
|
DatabaseInstant |
next() |
Return the next higher DatabaseInstant.
|
DatabaseInstant |
prior() |
Return the next lower DatabaseInstant.
|
void |
readExternal(java.io.ObjectInput oi) |
Read this in.
|
static java.lang.String |
toDebugString(long instant) |
|
java.lang.String |
toString() |
Convert the database instant to a string.
|
void |
writeExternal(java.io.ObjectOutput oo) |
Write this out.
|
public static final long INVALID_LOG_INSTANT
public static final long DERBY_10_0_MAX_LOGFILE_NUMBER
public static final long MAX_LOGFILE_NUMBER
private static final long FILE_NUMBER_SHIFT
public static final long MAX_LOGFILE_SIZE
private static final long FILE_POSITION_MASK
private long fileNumber
private long filePosition
public LogCounter(long value)
public LogCounter(long fileNumber, long position)
public LogCounter()
public static final long makeLogInstantAsLong(long filenum, long filepos)
public static final long getLogFilePosition(long valueAsLong)
public static final long getLogFileNumber(long valueAsLong)
public boolean lessThan(DatabaseInstant other)
lessThan
in interface DatabaseInstant
other
- a DatabaseInstant from the same database as
this.public boolean equals(java.lang.Object other)
DatabaseInstant
equals
in interface DatabaseInstant
equals
in class java.lang.Object
other
- a DatabaseInstant from the same database as
this.public DatabaseInstant next()
DatabaseInstant
next
in interface DatabaseInstant
public DatabaseInstant prior()
DatabaseInstant
prior
in interface DatabaseInstant
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
DatabaseInstant
toString
in interface DatabaseInstant
toString
in class java.lang.Object
public static java.lang.String toDebugString(long instant)
public long getValueAsLong()
public long getLogFilePosition()
public long getLogFileNumber()
public void readExternal(java.io.ObjectInput oi) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
- error reading from log streamjava.lang.ClassNotFoundException
- corrupted log streampublic void writeExternal(java.io.ObjectOutput oo) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
- error writing to log streampublic int getTypeFormatId()
getTypeFormatId
in interface TypedFormat
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.