Quadcap Embeddable Database

com.quadcap.sql.DatabaseRoot Class Reference

Inheritance diagram for com.quadcap.sql.DatabaseRoot:

Externalizable DatafileRoot List of all members.

Detailed Description

The persistent root block of the database.

Author:
Stan Bailes

Definition at line 56 of file DatabaseRoot.java.

Public Member Functions

 DatabaseRoot ()
 Default constructor.

 DatabaseRoot (Database db, String dbFileName, Properties props) throws IOException
 Explicit constuctor for database creation.

void setDatabase (Database db)
 Set the database which owns this root.

int getBuildNumber ()
 Return the build number.

long getRelationIndexNode ()
 Return the root block of the relation index.

long getIndexIndexNode ()
 Return the root block of the index index.

long getForwardDepsNode ()
 Return the root block of the forward dependencies graph.

long getReverseDepsNode ()
 Return the root block of the reverse dependencies graph.

long getBlobRefCountRoot ()
 Return the root block of the blob ref count index.

long getNextTransId ()
 Return the next transaction id.

String getBackupDir ()
 Return the backup directory name.

int getBackupCount ()
 Return the backup count.

int getBackupDays ()
 Return the backup days.

int getBackupLastDay ()
 Return the backup last day.

int getBackupTime ()
 Return the backup time.

String getBackupFormat ()
 Return the backup format.

void setBackupDir (String dir)
 Set the backup directory.

void setBackupCount (int count)
 Set the backup count.

void setBackupDays (int days)
 Set the backup days.

void setBackupLastDay (int day)
 Set the backup last day.

void setBackupTime (int time)
 Set the backup time.

void setBackupFormat (String fmt)
 Set the backup format.

void setNextTransId (long id)
 Set the backup directory.

void readExternal (ObjectInput in) throws IOException, ClassNotFoundException
 Read me from a stream.

void writeExternal (ObjectOutput out) throws IOException
 Write me to a stream.


Package Attributes

int buildNumber = -1
long tableIndexNode = -1
long indexIndexNode = -1
long forwardDepsNode = -1
long reverseDepsNode = -1
long blobRefCountRoot = -1
long nextTransId = 1
String dbFileName = null
String unused1 = null
String unused2 = null
String backupDir = null
int backupCount = 1
 Backups roll; Number of backups to keep.

int backupDays = 0
 bitmap SUN=1 - SAT=7

int backupTime = 0
 minutes after midnight

int backupLastDay = -1
 Julian day of previous backup.

String backupFormat = "xml.gz"
Database db


Constructor & Destructor Documentation

com.quadcap.sql.DatabaseRoot.DatabaseRoot  ) 
 

Default constructor.

Definition at line 88 of file DatabaseRoot.java.

com.quadcap.sql.DatabaseRoot.DatabaseRoot Database  db,
String  dbFileName,
Properties  props
throws IOException
 

Explicit constuctor for database creation.

Definition at line 93 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupDir, com.quadcap.sql.DatabaseRoot.blobRefCountRoot, com.quadcap.sql.DatabaseRoot.db, com.quadcap.sql.DatabaseRoot.dbFileName, com.quadcap.sql.DatabaseRoot.forwardDepsNode, com.quadcap.sql.DatabaseRoot.indexIndexNode, com.quadcap.sql.DatabaseRoot.reverseDepsNode, and com.quadcap.sql.DatabaseRoot.tableIndexNode.


Member Function Documentation

int com.quadcap.sql.DatabaseRoot.getBackupCount  ) 
 

Return the backup count.

Definition at line 158 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupCount.

Referenced by com.quadcap.sql.Database.getBackupCount().

int com.quadcap.sql.DatabaseRoot.getBackupDays  ) 
 

Return the backup days.

Definition at line 163 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupDays.

Referenced by com.quadcap.sql.Database.getBackupDays().

String com.quadcap.sql.DatabaseRoot.getBackupDir  ) 
 

Return the backup directory name.

Definition at line 153 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupDir.

Referenced by com.quadcap.sql.Database.getBackupDir().

String com.quadcap.sql.DatabaseRoot.getBackupFormat  ) 
 

Return the backup format.

Definition at line 178 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupFormat.

Referenced by com.quadcap.sql.Database.getBackupFormat().

int com.quadcap.sql.DatabaseRoot.getBackupLastDay  ) 
 

Return the backup last day.

Definition at line 168 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupLastDay.

Referenced by com.quadcap.sql.Database.getBackupLastDay().

int com.quadcap.sql.DatabaseRoot.getBackupTime  ) 
 

Return the backup time.

Definition at line 173 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupTime.

Referenced by com.quadcap.sql.Database.getBackupTime().

long com.quadcap.sql.DatabaseRoot.getBlobRefCountRoot  ) 
 

Return the root block of the blob ref count index.

Definition at line 143 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.blobRefCountRoot.

Referenced by com.quadcap.sql.Database.bootFromRoot(), and com.quadcap.sql.Database.display().

int com.quadcap.sql.DatabaseRoot.getBuildNumber  ) 
 

Return the build number.

Definition at line 118 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.buildNumber.

long com.quadcap.sql.DatabaseRoot.getForwardDepsNode  ) 
 

Return the root block of the forward dependencies graph.

Definition at line 133 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.forwardDepsNode.

Referenced by com.quadcap.sql.Database.bootFromRoot(), and com.quadcap.sql.Database.display().

long com.quadcap.sql.DatabaseRoot.getIndexIndexNode  ) 
 

Return the root block of the index index.

Definition at line 128 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.indexIndexNode.

Referenced by com.quadcap.sql.Database.bootFromRoot(), and com.quadcap.sql.Database.display().

long com.quadcap.sql.DatabaseRoot.getNextTransId  ) 
 

Return the next transaction id.

Definition at line 148 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.nextTransId.

Referenced by com.quadcap.sql.Database.display().

long com.quadcap.sql.DatabaseRoot.getRelationIndexNode  ) 
 

Return the root block of the relation index.

Definition at line 123 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.tableIndexNode.

Referenced by com.quadcap.sql.Database.bootFromRoot(), and com.quadcap.sql.Database.display().

long com.quadcap.sql.DatabaseRoot.getReverseDepsNode  ) 
 

Return the root block of the reverse dependencies graph.

Definition at line 138 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.reverseDepsNode.

Referenced by com.quadcap.sql.Database.bootFromRoot(), and com.quadcap.sql.Database.display().

void com.quadcap.sql.DatabaseRoot.readExternal ObjectInput  in  )  throws IOException, ClassNotFoundException
 

Read me from a stream.

Definition at line 218 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupCount, com.quadcap.sql.DatabaseRoot.backupDays, com.quadcap.sql.DatabaseRoot.backupDir, com.quadcap.sql.DatabaseRoot.backupFormat, com.quadcap.sql.DatabaseRoot.backupLastDay, com.quadcap.sql.DatabaseRoot.backupTime, com.quadcap.sql.DatabaseRoot.blobRefCountRoot, com.quadcap.sql.DatabaseRoot.buildNumber, com.quadcap.sql.DatabaseRoot.dbFileName, com.quadcap.sql.DatabaseRoot.forwardDepsNode, com.quadcap.sql.DatabaseRoot.indexIndexNode, com.quadcap.sql.DatabaseRoot.nextTransId, com.quadcap.sql.DatabaseRoot.readExternal(), com.quadcap.sql.DatabaseRoot.reverseDepsNode, com.quadcap.sql.DatabaseRoot.tableIndexNode, com.quadcap.sql.DatabaseRoot.unused1, and com.quadcap.sql.DatabaseRoot.unused2.

Referenced by com.quadcap.sql.DatabaseRoot.readExternal().

void com.quadcap.sql.DatabaseRoot.setBackupCount int  count  ) 
 

Set the backup count.

Definition at line 188 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupCount, and com.quadcap.sql.DatabaseRoot.setBackupCount().

Referenced by com.quadcap.sql.DatabaseRoot.setBackupCount(), and com.quadcap.sql.Database.setBackupCount().

void com.quadcap.sql.DatabaseRoot.setBackupDays int  days  ) 
 

Set the backup days.

Definition at line 193 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupDays, and com.quadcap.sql.DatabaseRoot.setBackupDays().

Referenced by com.quadcap.sql.DatabaseRoot.setBackupDays(), and com.quadcap.sql.Database.setBackupDays().

void com.quadcap.sql.DatabaseRoot.setBackupDir String  dir  ) 
 

Set the backup directory.

Definition at line 183 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupDir, and com.quadcap.sql.DatabaseRoot.setBackupDir().

Referenced by com.quadcap.sql.DatabaseRoot.setBackupDir(), and com.quadcap.sql.Database.setBackupDir().

void com.quadcap.sql.DatabaseRoot.setBackupFormat String  fmt  ) 
 

Set the backup format.

Definition at line 208 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupFormat, and com.quadcap.sql.DatabaseRoot.setBackupFormat().

Referenced by com.quadcap.sql.DatabaseRoot.setBackupFormat(), and com.quadcap.sql.Database.setBackupFormat().

void com.quadcap.sql.DatabaseRoot.setBackupLastDay int  day  ) 
 

Set the backup last day.

Definition at line 198 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupLastDay, and com.quadcap.sql.DatabaseRoot.setBackupLastDay().

Referenced by com.quadcap.sql.DatabaseRoot.setBackupLastDay(), and com.quadcap.sql.Database.setBackupLastDay().

void com.quadcap.sql.DatabaseRoot.setBackupTime int  time  ) 
 

Set the backup time.

Definition at line 203 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupTime, and com.quadcap.sql.DatabaseRoot.setBackupTime().

Referenced by com.quadcap.sql.DatabaseRoot.setBackupTime(), and com.quadcap.sql.Database.setBackupTime().

void com.quadcap.sql.DatabaseRoot.setDatabase Database  db  ) 
 

Set the database which owns this root.

Definition at line 111 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.setDatabase().

Referenced by com.quadcap.sql.DatabaseRoot.setDatabase().

void com.quadcap.sql.DatabaseRoot.setNextTransId long  id  ) 
 

Set the backup directory.

Definition at line 213 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.nextTransId, and com.quadcap.sql.DatabaseRoot.setNextTransId().

Referenced by com.quadcap.sql.Database.bootFromRoot(), com.quadcap.sql.Database.getNextTransId(), and com.quadcap.sql.DatabaseRoot.setNextTransId().

void com.quadcap.sql.DatabaseRoot.writeExternal ObjectOutput  out  )  throws IOException
 

Write me to a stream.

Definition at line 242 of file DatabaseRoot.java.

References com.quadcap.sql.DatabaseRoot.backupCount, com.quadcap.sql.DatabaseRoot.backupDays, com.quadcap.sql.DatabaseRoot.backupDir, com.quadcap.sql.DatabaseRoot.backupFormat, com.quadcap.sql.DatabaseRoot.backupLastDay, com.quadcap.sql.DatabaseRoot.backupTime, com.quadcap.sql.DatabaseRoot.blobRefCountRoot, com.quadcap.sql.DatabaseRoot.buildNumber, com.quadcap.sql.DatabaseRoot.dbFileName, com.quadcap.sql.DatabaseRoot.forwardDepsNode, com.quadcap.sql.DatabaseRoot.indexIndexNode, com.quadcap.sql.DatabaseRoot.nextTransId, com.quadcap.sql.DatabaseRoot.reverseDepsNode, com.quadcap.sql.DatabaseRoot.tableIndexNode, com.quadcap.sql.DatabaseRoot.unused1, com.quadcap.sql.DatabaseRoot.unused2, and com.quadcap.sql.DatabaseRoot.writeExternal().

Referenced by com.quadcap.sql.DatabaseRoot.writeExternal().


Member Data Documentation

int com.quadcap.sql.DatabaseRoot.backupCount = 1 [package]
 

Backups roll; Number of backups to keep.

Definition at line 70 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.getBackupCount(), com.quadcap.sql.DatabaseRoot.readExternal(), com.quadcap.sql.DatabaseRoot.setBackupCount(), and com.quadcap.sql.DatabaseRoot.writeExternal().

int com.quadcap.sql.DatabaseRoot.backupDays = 0 [package]
 

bitmap SUN=1 - SAT=7

Definition at line 73 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.getBackupDays(), com.quadcap.sql.DatabaseRoot.readExternal(), com.quadcap.sql.DatabaseRoot.setBackupDays(), and com.quadcap.sql.DatabaseRoot.writeExternal().

String com.quadcap.sql.DatabaseRoot.backupDir = null [package]
 

Definition at line 67 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.DatabaseRoot(), com.quadcap.sql.DatabaseRoot.getBackupDir(), com.quadcap.sql.DatabaseRoot.readExternal(), com.quadcap.sql.DatabaseRoot.setBackupDir(), and com.quadcap.sql.DatabaseRoot.writeExternal().

String com.quadcap.sql.DatabaseRoot.backupFormat = "xml.gz" [package]
 

Definition at line 81 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.getBackupFormat(), com.quadcap.sql.DatabaseRoot.readExternal(), com.quadcap.sql.DatabaseRoot.setBackupFormat(), and com.quadcap.sql.DatabaseRoot.writeExternal().

int com.quadcap.sql.DatabaseRoot.backupLastDay = -1 [package]
 

Julian day of previous backup.

Definition at line 79 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.getBackupLastDay(), com.quadcap.sql.DatabaseRoot.readExternal(), com.quadcap.sql.DatabaseRoot.setBackupLastDay(), and com.quadcap.sql.DatabaseRoot.writeExternal().

int com.quadcap.sql.DatabaseRoot.backupTime = 0 [package]
 

minutes after midnight

Definition at line 76 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.getBackupTime(), com.quadcap.sql.DatabaseRoot.readExternal(), com.quadcap.sql.DatabaseRoot.setBackupTime(), and com.quadcap.sql.DatabaseRoot.writeExternal().

long com.quadcap.sql.DatabaseRoot.blobRefCountRoot = -1 [package]
 

Definition at line 62 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.DatabaseRoot(), com.quadcap.sql.DatabaseRoot.getBlobRefCountRoot(), com.quadcap.sql.DatabaseRoot.readExternal(), and com.quadcap.sql.DatabaseRoot.writeExternal().

int com.quadcap.sql.DatabaseRoot.buildNumber = -1 [package]
 

Definition at line 57 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.getBuildNumber(), com.quadcap.sql.DatabaseRoot.readExternal(), and com.quadcap.sql.DatabaseRoot.writeExternal().

Database com.quadcap.sql.DatabaseRoot.db [package]
 

Definition at line 83 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.DatabaseRoot().

String com.quadcap.sql.DatabaseRoot.dbFileName = null [package]
 

Definition at line 64 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.DatabaseRoot(), com.quadcap.sql.DatabaseRoot.readExternal(), and com.quadcap.sql.DatabaseRoot.writeExternal().

long com.quadcap.sql.DatabaseRoot.forwardDepsNode = -1 [package]
 

Definition at line 60 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.DatabaseRoot(), com.quadcap.sql.DatabaseRoot.getForwardDepsNode(), com.quadcap.sql.DatabaseRoot.readExternal(), and com.quadcap.sql.DatabaseRoot.writeExternal().

long com.quadcap.sql.DatabaseRoot.indexIndexNode = -1 [package]
 

Definition at line 59 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.DatabaseRoot(), com.quadcap.sql.DatabaseRoot.getIndexIndexNode(), com.quadcap.sql.DatabaseRoot.readExternal(), and com.quadcap.sql.DatabaseRoot.writeExternal().

long com.quadcap.sql.DatabaseRoot.nextTransId = 1 [package]
 

Definition at line 63 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.getNextTransId(), com.quadcap.sql.DatabaseRoot.readExternal(), com.quadcap.sql.DatabaseRoot.setNextTransId(), and com.quadcap.sql.DatabaseRoot.writeExternal().

long com.quadcap.sql.DatabaseRoot.reverseDepsNode = -1 [package]
 

Definition at line 61 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.DatabaseRoot(), com.quadcap.sql.DatabaseRoot.getReverseDepsNode(), com.quadcap.sql.DatabaseRoot.readExternal(), and com.quadcap.sql.DatabaseRoot.writeExternal().

long com.quadcap.sql.DatabaseRoot.tableIndexNode = -1 [package]
 

Definition at line 58 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.DatabaseRoot(), com.quadcap.sql.DatabaseRoot.getRelationIndexNode(), com.quadcap.sql.DatabaseRoot.readExternal(), and com.quadcap.sql.DatabaseRoot.writeExternal().

String com.quadcap.sql.DatabaseRoot.unused1 = null [package]
 

Definition at line 65 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.readExternal(), and com.quadcap.sql.DatabaseRoot.writeExternal().

String com.quadcap.sql.DatabaseRoot.unused2 = null [package]
 

Definition at line 66 of file DatabaseRoot.java.

Referenced by com.quadcap.sql.DatabaseRoot.readExternal(), and com.quadcap.sql.DatabaseRoot.writeExternal().