public class Database
extends java.lang.Object
Provides a set of methods that can be used to access these variables from anywhere.
Modifier and Type | Field and Description |
---|---|
private BufferPool |
_bufferpool |
private Catalog |
_catalog |
private static java.util.concurrent.atomic.AtomicReference<Database> |
_instance |
private LogFile |
_logfile |
private static java.lang.String |
LOGFILENAME |
Modifier | Constructor and Description |
---|---|
private |
Database() |
Modifier and Type | Method and Description |
---|---|
static BufferPool |
getBufferPool()
Return the buffer pool of the static Database instance
|
static Catalog |
getCatalog()
Return the catalog of the static Database instance
|
static LogFile |
getLogFile()
Return the log file of the static Database instance
|
static void |
reset() |
static BufferPool |
resetBufferPool(int pages)
Method used for testing -- create a new instance of the buffer pool and
return it
|
private static java.util.concurrent.atomic.AtomicReference<Database> _instance
private final Catalog _catalog
private final BufferPool _bufferpool
private static final java.lang.String LOGFILENAME
private final LogFile _logfile
public static LogFile getLogFile()
public static BufferPool getBufferPool()
public static Catalog getCatalog()
public static BufferPool resetBufferPool(int pages)
public static void reset()