simpledb.server
Class SimpleDB

java.lang.Object
  extended by simpledb.server.SimpleDB

public class SimpleDB
extends Object

The class that provides system-wide static global values. These values must be initialized by the method init before use. The methods initFileMgr, initFileAndLogMgr, initFileLogAndBufferMgr, and initMetadataMgr provide limited initialization, and are useful for debugging purposes.

Author:
Edward Sciore

Field Summary
static int BUFFER_SIZE
           
static String LOG_FILE
           
 
Constructor Summary
SimpleDB()
           
 
Method Summary
static BufferMgr bufferMgr()
           
static FileMgr fileMgr()
           
static void init(String dirname)
          Initializes the system.
static void initFileAndLogMgr(String dirname)
          Initializes the file and log managers.
static void initFileLogAndBufferMgr(String dirname)
          Initializes the file, log, and buffer managers.
static void initFileMgr(String dirname)
          Initializes only the file manager.
static void initMetadataMgr(boolean isnew, Transaction tx)
          Initializes metadata manager.
static LogMgr logMgr()
           
static MetadataMgr mdMgr()
           
static Planner planner()
          Creates a planner for SQL commands.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFER_SIZE

public static int BUFFER_SIZE

LOG_FILE

public static String LOG_FILE
Constructor Detail

SimpleDB

public SimpleDB()
Method Detail

init

public static void init(String dirname)
Initializes the system. This method is called during system startup.

Parameters:
dirname - the name of the database directory

initFileMgr

public static void initFileMgr(String dirname)
Initializes only the file manager.

Parameters:
dirname - the name of the database directory

initFileAndLogMgr

public static void initFileAndLogMgr(String dirname)
Initializes the file and log managers.

Parameters:
dirname - the name of the database directory

initFileLogAndBufferMgr

public static void initFileLogAndBufferMgr(String dirname)
Initializes the file, log, and buffer managers.

Parameters:
dirname - the name of the database directory

initMetadataMgr

public static void initMetadataMgr(boolean isnew,
                                   Transaction tx)
Initializes metadata manager.

Parameters:
isnew - an indication of whether a new database needs to be created.
tx - the transaction performing the initialization

fileMgr

public static FileMgr fileMgr()

bufferMgr

public static BufferMgr bufferMgr()

logMgr

public static LogMgr logMgr()

mdMgr

public static MetadataMgr mdMgr()

planner

public static Planner planner()
Creates a planner for SQL commands. To change how the planner works, modify this method.

Returns:
the system's planner for SQL commands


Copyright © 2011. All Rights Reserved.