public class Database
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTICA_DIR
Directory of the server.
|
static java.lang.String |
HASH_ALGORITHMS
The property name for the hash algorithms.
|
static java.lang.String |
TEMP_DIR
Temporary directory.
|
| Constructor and Description |
|---|
Database(java.lang.String propsFile)
Constructs a new Database instance using the given file name to
read the properties from.
|
Database(java.lang.String propsFile,
boolean init)
Constructs a new Database specifying whether this is a new
instance or not.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
Start up the database.
|
Sink |
runStatement(java.lang.String statement)
Executes the given statement.
|
void |
shutdown()
Shuts down the server.
|
public static java.lang.String ATTICA_DIR
public static java.lang.String TEMP_DIR
public static final java.lang.String HASH_ALGORITHMS
public Database(java.lang.String propsFile)
throws ServerException
propsFile - the name of the file containing the DB
properties.ServerException - thrown whenever the DB cannot be
constructed.public Database(java.lang.String propsFile,
boolean init)
throws ServerException
propsFile - the name of the file containing the DB
properties.init - if set to true this is a new DB
instance, so the catalog is generated, if set to
false this is an old instance and the catalog is
simply read from disk.ServerException - thrown whenever the DB cannot be
constructed.public Sink runStatement(java.lang.String statement) throws EngineException
statement - the statement to be executed.EngineException - thrown whenever the statement cannot be
executed.public void shutdown()
throws ServerException
ServerException - thrown whenever the server cannot be shut
down.public static void main(java.lang.String[] args)
args - the arguments to the server.