Top Description Fields Constructors Methods
org.apache.derby.impl.store.raw.log

public Class LogRecord

extends Object
implements Formatable
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.services.io.Formatable, org.apache.derby.iapi.services.io.TypedFormat, java.io.Externalizable, java.io.Serializable
Imports
org.apache.derby.shared.common.reference.SQLState, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.services.io.FormatIdUtil, .StoredFormatIds, .Formatable, .CompressedNumber, org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.store.raw.Loggable, .Compensation, .RePreparable, .Undoable, org.apache.derby.iapi.store.raw.xact.TransactionId, java.io.ObjectOutput, .ObjectInput, .IOException

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

Field Summary

Modifier and TypeField and Description
private static final int
private int
pack-priv transient ObjectInput
private Loggable
private TransactionId

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static int
public Loggable
public RePreparable
public static int
getStoredSize(int group, TransactionId xactId)

public TransactionId
public int
public Undoable
public int
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public static int
public static int
public void
readExternal(ObjectInput
the stream to read data from in order to restore the object
in
)

Implements java.io.Externalizable.readExternal.

Read this in

public boolean
public void
public void
skipLoggable()

Skip over the loggable.

public void
writeExternal(ObjectOutput
the stream to write the object to
out
)

Implements java.io.Externalizable.writeExternal.

Write this out.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

formatLengthback to summary
private static final int formatLength
groupback to summary
private int group
inputback to summary
pack-priv transient ObjectInput input
opback to summary
private Loggable op
xactIdback to summary
private TransactionId xactId

Constructor Detail

LogRecordback to summary
public LogRecord()

Method Detail

formatOverheadback to summary
public static int formatOverhead()
getLoggableback to summary
public Loggable getLoggable() throws IOException, ClassNotFoundException
getRePreparableback to summary
public RePreparable getRePreparable() throws IOException, ClassNotFoundException
getStoredSizeback to summary
public static int getStoredSize(int group, TransactionId xactId)
getTransactionIdback to summary
public TransactionId getTransactionId() throws IOException, ClassNotFoundException
getTypeFormatIdback to summary
public int getTypeFormatId()

Implements org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

Return my format identifier.

Returns:int

Doc from org.apache.derby.iapi.services.io.TypedFormat.getTypeFormatId.

The identifier. (A UUID stuffed in an array of 16 bytes).

getUndoableback to summary
public Undoable getUndoable() throws IOException, ClassNotFoundException
groupback to summary
public int group()
isAbortback to summary
public boolean isAbort()
isChecksumback to summary
public boolean isChecksum()
isCLRback to summary
public boolean isCLR()
isCommitback to summary
public boolean isCommit()
isCompleteback to summary
public boolean isComplete()
isFirstback to summary
public boolean isFirst()
isPrepareback to summary
public boolean isPrepare()
maxGroupStoredSizeback to summary
public static int maxGroupStoredSize()
maxTransactionIdStoredSizeback to summary
public static int maxTransactionIdStoredSize(TransactionId tranId)
readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

Implements java.io.Externalizable.readExternal.

Read this in

Parameters
in:ObjectInput

Doc from java.io.Externalizable.readExternal.

the stream to read data from in order to restore the object

Exceptions
IOException:
error reading from log stream
ClassNotFoundException:
corrupted log stream
requiresPrepareLocksback to summary
public boolean requiresPrepareLocks()
setValueback to summary
public void setValue(TransactionId xactId, Loggable op)
skipLoggableback to summary
public void skipLoggable() throws StandardException

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

Exceptions
StandardException:
if the loggable is not found, log is corrupt
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Implements java.io.Externalizable.writeExternal.

Write this out.

Parameters
out:ObjectOutput

Doc from java.io.Externalizable.writeExternal.

the stream to write the object to

Exceptions
IOException:
error writing to log stream