FileDocCategorySizeDatePackage
LogRestartDescriptor.javaAPI DocGlassfish v2 API6263Fri May 04 22:36:38 BST 2007com.sun.jts.CosTransactions

LogRestartDescriptor

public class LogRestartDescriptor extends Object implements Serializable
A class containing restart information.
version
0.01
author
Simon Holdsworth, IBM Corporation
see
LogHandle

Fields Summary
static final int
SIZEOF
This constant holds the size of the LogRestartDecriptor object.
int
restartValid
int
restartDataLength
int
timeStamp
Constructors Summary
LogRestartDescriptor()
Default LogRestartDescriptor constructor.

param
return
see


               
     
LogRestartDescriptor(byte[] bytes, int index)
Constructs a LogRestartDescriptor from the given byte array.

param
bytes The array of bytes from which the object is to be constructed.
param
index The index in the array where copy is to start.
return
see

        restartValid =  (bytes[index++]&255) +
                        ((bytes[index++]&255) << 8) +
                        ((bytes[index++]&255) << 16) +
                        ((bytes[index++]&255) << 24);

        restartDataLength = (bytes[index++]&255) +
                            ((bytes[index++]&255) << 8) +
                            ((bytes[index++]&255) << 16) +
                            ((bytes[index++]&255) << 24);

        timeStamp = (bytes[index++]&255) +
                    ((bytes[index++]&255) << 8) +
                    ((bytes[index++]&255) << 16) +
                    ((bytes[index++]&255) << 24);
    
Methods Summary
final booleanequals(com.sun.jts.CosTransactions.LogRestartDescriptor other)
Determines whether the target object is equal to the parameter.

param
other The other LogRestartDescriptor to be compared.
return
Indicates whether the objects are equal.
see

        return (restartValid      == other.restartValid &&
                restartDataLength == other.restartDataLength &&
                timeStamp         == other.timeStamp);
    
final inttoBytes(byte[] bytes, int index)
Makes a byte representation of the LogRestartDescriptor.

param
bytes The array of bytes into which the object is to be copied.
param
index The index in the array where copy is to start.
return
Number of bytes copied.
see

        bytes[index++] = (byte) restartValid;
        bytes[index++] = (byte)(restartValid >> 8);
        bytes[index++] = (byte)(restartValid >> 16);
        bytes[index++] = (byte)(restartValid >> 24);
        bytes[index++] = (byte) restartDataLength;
        bytes[index++] = (byte)(restartDataLength >> 8);
        bytes[index++] = (byte)(restartDataLength >> 16);
        bytes[index++] = (byte)(restartDataLength >> 24);
        bytes[index++] = (byte) timeStamp;
        bytes[index++] = (byte)(timeStamp >> 8);
        bytes[index++] = (byte)(timeStamp >> 16);
        bytes[index++] = (byte)(timeStamp >> 24);

        return SIZEOF;
    
public final java.lang.StringtoString()
This method is called to direct the object to format its state to a String.

param
return
The formatted representation of the object.
see

        return "LRD(valid="/*#Frozen*/ + restartValid +
               ",len="/*#Frozen*/ + restartDataLength +
               ",time="/*#Frozen*/ + timeStamp + ")"/*#Frozen*/;