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 intprivate int(package private) ObjectInputprivate Loggableprivate TransactionId -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intstatic intgetStoredSize(int group, TransactionId xactId) intReturn my format identifier.intgroup()booleanisAbort()booleanbooleanisCLR()booleanisCommit()booleanbooleanisFirst()booleanstatic intstatic intvoidRead this inbooleanvoidsetValue(TransactionId xactId, Loggable op) voidSkip over the loggable.voidWrite 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:
writeExternalin interfaceExternalizable- Throws:
IOException- error writing to log stream
-
readExternal
Read this in- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException- error reading from log streamClassNotFoundException- corrupted log stream
-
getTypeFormatId
public int getTypeFormatId()Return my format identifier.- Specified by:
getTypeFormatIdin 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:
IOExceptionClassNotFoundException
-
getLoggable
- Throws:
IOExceptionClassNotFoundException
-
getRePreparable
- Throws:
IOExceptionClassNotFoundException
-
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:
IOExceptionClassNotFoundException
-
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()
-