1 23 24 28 50 package com.sun.jts.CosTransactions; 51 52 54 import java.io.*; 55 56 67 74 class LogExtent extends Object { 75 76 79 81 final static int ACCESSTYPE_UNKNOWN = 0; 82 83 85 final static int ACCESSTYPE_READ = 1; 86 87 89 final static int ACCESSTYPE_WRITE = 2; 90 91 93 final static int EXTENT_RADIX = 36; 94 95 100 final static int MAX_NO_OF_EXTENTS = EXTENT_RADIX*EXTENT_RADIX*EXTENT_RADIX; 101 102 104 LogExtent blockValid = null; 105 106 108 int extentNumber = -1; 109 110 112 LogFileHandle fileHandle = null; 113 114 116 File file = null; 117 118 120 boolean writtenSinceLastForce = false; 121 122 124 int cursorPosition = 0; 125 126 128 int lastAccess = ACCESSTYPE_UNKNOWN; 129 130 139 LogExtent( int extent, 140 LogFileHandle extentFH, 141 File extentFile ) { 142 extentNumber = extent; 143 fileHandle = extentFH; 144 file = extentFile; 145 } 146 147 155 public void finalize() { 156 try { 157 fileHandle.finalize(); 158 } catch( Throwable e ) {}; 159 160 blockValid = null; 161 file = null; 162 } 163 164 172 final static int modExtent( int ext ) { 173 return (ext % MAX_NO_OF_EXTENTS); 174 } 175 } 176 | Popular Tags |