Top Description Fields Constructors Methods
org.hsqldb.persist

pack-priv final Class DataFileDefrag

extends Object
Class Inheritance
Imports
org.hsqldb.Database, .Session, .Table, .TableBase, org.hsqldb.error.Error, .ErrorCode, org.hsqldb.lib.DoubleIntIndex, .DoubleLongIndex, .HsqlArrayList, .LongLookup, .StopWatch, .StringUtil

Routine to defrag the *.data file. This method iterates over the primary index of a table to find the disk position for each row and stores it, together with the new position in an array. A second pass over the primary index writes each row to the new disk image after translating the old pointers to the new.
Author
Fred Toussi (fredt@users dot sourceforge.net)
Since
1.7.2
Version
2.7.3

Field Summary

Modifier and TypeField and Description
pack-priv Database
pack-priv DataFileCache
pack-priv String
pack-priv DataFileCache
pack-priv LongLookup
pack-priv long[][]
pack-priv StopWatch

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public long[][]
pack-priv void
process(Session session)

pack-priv long[]
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

databaseback to summary
pack-priv Database database
dataCacheback to summary
pack-priv DataFileCache dataCache
dataFileNameback to summary
pack-priv String dataFileName
dataFileOutback to summary
pack-priv DataFileCache dataFileOut
pointerLookupback to summary
pack-priv LongLookup pointerLookup
rootsListback to summary
pack-priv long[][] rootsList
stopwback to summary
pack-priv StopWatch stopw

Constructor Detail

DataFileDefragback to summary
pack-priv DataFileDefrag(Database db, DataFileCache cache)

Method Detail

getIndexRootsback to summary
public long[][] getIndexRoots()
processback to summary
pack-priv void process(Session session)
writeTableToDataFileback to summary
pack-priv long[] writeTableToDataFile(Session session, Table table)