public class ParosDatabase extends AbstractDatabase
logger
DB_TYPE_HSQLDB
Constructor and Description |
---|
ParosDatabase() |
Modifier and Type | Method and Description |
---|---|
void |
close(boolean compact,
boolean cleanup)
Closes the database.
|
void |
deleteSession(String sessionName)
Permanently delete the specified session
|
void |
discardSession(long sessionId)
Discards the history associated with the given session ID, called when a session is not to be
saved (and a new one is about to be created).
|
DatabaseServer |
getDatabaseServer() |
TableAlert |
getTableAlert() |
TableAlertTag |
getTableAlertTag() |
TableContext |
getTableContext() |
TableHistory |
getTableHistory() |
TableParam |
getTableParam() |
TableScan |
getTableScan() |
TableSession |
getTableSession() |
TableSessionUrl |
getTableSessionUrl() |
TableStructure |
getTableStructure() |
TableTag |
getTableTag() |
String |
getType()
The type of the database - e.g.
|
void |
open(String path) |
void |
setDatabaseParam(DatabaseParam databaseOptions)
Sets the object that holds the database options.
|
void |
setTableAlert(TableAlert tableAlert) |
void |
setTableAlertTag(TableAlertTag tableAlertTag) |
void |
setTableScan(TableScan tableScan) |
void |
setTableSessionUrl(TableSessionUrl tableSessionUrl) |
void |
setTableTag(TableTag tableTag) |
addDatabaseListener, close, getDatabaseListeners, getLogger, notifyListenersDatabaseOpen, notifyListenersDatabaseOpen, removeDatabaseListener, removeDatabaseListeners
public DatabaseServer getDatabaseServer()
public TableHistory getTableHistory()
public TableSession getTableSession()
public void open(String path) throws ClassNotFoundException, Exception
ClassNotFoundException
Exception
public void deleteSession(String sessionName)
Database
public void close(boolean compact, boolean cleanup)
AbstractDatabase
compact
is true
, the database will be
compacted, compacting the database ensures a minimal space disk usage but it will also take
longer to close. If the parameter cleanup
is true
any necessary cleanups are
performed prior to closing the database (the cleanup removes the temporary HistoryReference
s.)
Also, removes the database listeners added previously.
close
in interface Database
close
in class AbstractDatabase
compact
- true
if the database should be compacted, false
otherwise.cleanup
- true
if any necessary cleanups should be performed, false
otherwise.HistoryReference
public TableAlert getTableAlert()
public void setTableAlert(TableAlert tableAlert)
tableAlert
- The tableAlert to set.public TableAlertTag getTableAlertTag()
public void setTableAlertTag(TableAlertTag tableAlertTag)
public TableScan getTableScan()
public void setTableScan(TableScan tableScan)
tableScan
- The tableScan to set.public TableTag getTableTag()
public void setTableTag(TableTag tableTag)
public TableSessionUrl getTableSessionUrl()
public void setTableSessionUrl(TableSessionUrl tableSessionUrl)
public TableParam getTableParam()
public TableContext getTableContext()
public TableStructure getTableStructure()
public String getType()
Database
public void setDatabaseParam(DatabaseParam databaseOptions)
databaseOptions
- the object that holds the database options, must not be null
IllegalArgumentException
- if the given parameter is null
.public void discardSession(long sessionId) throws DatabaseException
Database
Implementations might opt to do nothing, for example, if the database is file based (HSQLDB) and those files are deleted if the session is not saved.
sessionId
- the ID of the sessionDatabaseException
- If an error occurred while discarding the history of the session.