Class LogRecord
java.lang.Object
org.apache.derby.impl.store.raw.log.LogRecord
- All Implemented Interfaces:
Externalizable
,Serializable
,Formatable
,TypedFormat
The log record written out to disk. This log record includes:
The is a holder object that may be setup using the setValue() and re-used rather than creating a new object for each actual log record.
The format of a log record is
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private int
(package private) ObjectInput
private Loggable
private TransactionId
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
static int
getStoredSize
(int group, TransactionId xactId) int
Return my format identifier.int
group()
boolean
isAbort()
boolean
boolean
isCLR()
boolean
isCommit()
boolean
boolean
isFirst()
boolean
static int
static int
void
Read this inboolean
void
setValue
(TransactionId xactId, Loggable op) void
Skip over the loggable.void
Write this out.
-
Field Details
-
xactId
-
op
-
group
private int group -
input
-
formatLength
private static final int formatLength
-
-
Constructor Details
-
LogRecord
public LogRecord()
-
-
Method Details
-
writeExternal
Write this out.- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
- error writing to log stream
-
readExternal
Read this in- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
- error reading from log streamClassNotFoundException
- corrupted log stream
-
getTypeFormatId
public int getTypeFormatId()Return my format identifier.- Specified by:
getTypeFormatId
in interfaceTypedFormat
- Returns:
- The identifier. (A UUID stuffed in an array of 16 bytes).
-
setValue
-
formatOverhead
public static int formatOverhead() -
maxGroupStoredSize
public static int maxGroupStoredSize() -
maxTransactionIdStoredSize
-
getStoredSize
-
getTransactionId
- Throws:
IOException
ClassNotFoundException
-
getLoggable
- Throws:
IOException
ClassNotFoundException
-
getRePreparable
- Throws:
IOException
ClassNotFoundException
-
skipLoggable
Skip over the loggable. Set the input stream to point ot after the loggable as if the entire log record has been sucked in by the log record- Throws:
StandardException
- if the loggable is not found, log is corrupt
-
getUndoable
- Throws:
IOException
ClassNotFoundException
-
isCLR
public boolean isCLR() -
isFirst
public boolean isFirst() -
isComplete
public boolean isComplete() -
isPrepare
public boolean isPrepare() -
requiresPrepareLocks
public boolean requiresPrepareLocks() -
isCommit
public boolean isCommit() -
isAbort
public boolean isAbort() -
group
public int group() -
isChecksum
public boolean isChecksum()
-