FileDocCategorySizeDatePackage
LogExtent.javaAPI DocGlassfish v2 API5977Wed Jun 13 23:03:46 BST 2007com.sun.jts.CosTransactions

LogExtent

public class LogExtent extends Object
A structure containing information for an open log file extent.
version
0.01
author
Simon Holdsworth, IBM Corporation
see

Fields Summary
static final int
ACCESSTYPE_UNKNOWN
Type of last access is unknown (forces fseek to required cursor pos'n)
static final int
ACCESSTYPE_READ
Last access was for reading
static final int
ACCESSTYPE_WRITE
Last access was for writing
static final int
EXTENT_RADIX
The radix used to convert extent numbers to strings.
static final int
MAX_NO_OF_EXTENTS
The maximum number of extent files that can be allocated to a single log at any one time. Extent names are made up of .nnn Hence this value is restricted by the .nnn extension (3 characters only, to support the FAT file system.
LogExtent
blockValid
This value is used to validate the LogExtent object.
int
extentNumber
The extent number.
LogFileHandle
fileHandle
The file handle for the log extent file.
File
file
The file for the log extent file.
boolean
writtenSinceLastForce
Indicates whether any information has been written since the last force.
int
cursorPosition
The cursor position in the log extent.
int
lastAccess
The last type of access to the extent.
Constructors Summary
LogExtent(int extent, LogFileHandle extentFH, File extentFile)
LogExtent constructor

param
extent The number of the extent.
param
extentFH The handle of the extent file.
return
see


                             
                
                
                           
        extentNumber = extent;
        fileHandle = extentFH;
        file = extentFile;
    
Methods Summary
public voiddoFinalize()
Default LogExtent destructor.

param
return
see

        try {
            fileHandle.finalize(); 
        } catch( Throwable e ) {};

        blockValid = null;
        file = null;
    
static final intmodExtent(int ext)
Modulates the extent number using the maximum extent number.

param
ext The extent number
return
The modulated extent number.
see

        return (ext % MAX_NO_OF_EXTENTS);