simpledb
Class Database

java.lang.Object
  extended by simpledb.Database

public class Database
extends java.lang.Object

Database is a class that initializes several static variables used by the database system (the catalog, the buffer pool, and the log files, in particular.)

Provides a set of methods that can be used to access these global variables from anywhere.


Field Summary
private static BufferPool _bufferpool
           
private static Catalog _catalog
           
 
Constructor Summary
private Database()
           
 
Method Summary
static BufferPool getBufferPool()
          Return the static instance of the buffer pool
static Catalog getCatalog()
          Return the static instance of the catalog
static BufferPool resetBufferPool(int pages)
          Method used for testing -- create a new instance of the buffer pool and return it
static LogFile resetLogFile()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_catalog

private static Catalog _catalog

_bufferpool

private static BufferPool _bufferpool
Constructor Detail

Database

private Database()
Method Detail

getBufferPool

public static BufferPool getBufferPool()
Return the static instance of the buffer pool


getCatalog

public static Catalog getCatalog()
Return the static instance of the catalog


resetBufferPool

public static BufferPool resetBufferPool(int pages)
Method used for testing -- create a new instance of the buffer pool and return it


resetLogFile

public static LogFile resetLogFile()
                            throws java.io.IOException
Throws:
java.io.IOException