org.apache.derby.impl.store.raw.log
Class ChecksumOperation
- java.lang.Object
-
- org.apache.derby.impl.store.raw.log.ChecksumOperation
-
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, Formatable, TypedFormat, Loggable
public class ChecksumOperation extends java.lang.Object implements Loggable
A Log Operation that represents a checksum for a group of log records that are written to the tranaction log file.- See Also:
Loggable, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static byteCRC32_ALGORITHM-
Fields inherited from interface org.apache.derby.iapi.store.raw.Loggable
ABORT, BI_LOG, CHECKSUM, COMMIT, COMPENSATION, FILE_RESOURCE, FIRST, LAST, PREPARE, RAWSTORE, XA_NEEDLOCK
-
-
Constructor Summary
Constructors Constructor and Description ChecksumOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddoMe(Transaction xact, LogInstant instant, LimitObjectInput in)Nothing to do for the checksum log record because it does need to be applied during redo.ByteArraygetPreparedLog()the default for prepared log is always null for all the operations that don't have optionalData.intgetStoredSize()intgetTypeFormatId()Return my format identifier.intgroup()Checksum is a raw store operationvoidinit()booleanneedsRedo(Transaction xact)Checksum does not need to be redone, it is used to just verify that log records are written completely.voidreadExternal(java.io.ObjectInput in)voidreleaseResource(Transaction xact)Checksum has no resources to releasejava.lang.StringtoString()DEBUG: Print self.voidwriteExternal(java.io.ObjectOutput out)
-
-
-
Field Detail
-
CRC32_ALGORITHM
public static final byte CRC32_ALGORITHM
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init()
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
getStoredSize
public int getStoredSize()
-
getTypeFormatId
public int getTypeFormatId()
Return my format identifier.- Specified by:
getTypeFormatIdin interfaceTypedFormat- Returns:
- The identifier. (A UUID stuffed in an array of 16 bytes).
-
doMe
public void doMe(Transaction xact, LogInstant instant, LimitObjectInput in) throws StandardException
Nothing to do for the checksum log record because it does need to be applied during redo.- Specified by:
doMein interfaceLoggable- Parameters:
xact- the Transactioninstant- the log instant of this operationin- optional data- Throws:
StandardException- Standard Derby policy.
-
getPreparedLog
public ByteArray getPreparedLog()
the default for prepared log is always null for all the operations that don't have optionalData. If an operation has optional data, the operation need to prepare the optional data for this method. Checksum has no optional data to write out- Specified by:
getPreparedLogin interfaceLoggable
-
needsRedo
public boolean needsRedo(Transaction xact)
Checksum does not need to be redone, it is used to just verify that log records are written completely.- Specified by:
needsRedoin interfaceLoggable- Parameters:
xact- The transaction trying to redo this operation- Returns:
- true if operation needs redoing, false if not.
- See Also:
Loggable.releaseResource(org.apache.derby.iapi.store.raw.Transaction)
-
releaseResource
public void releaseResource(Transaction xact)
Checksum has no resources to release- Specified by:
releaseResourcein interfaceLoggable
-
group
public int group()
Checksum is a raw store operation
-
toString
public java.lang.String toString()
DEBUG: Print self.- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG