Package cz.metacentrum.perun.core.api
Interface DatabaseManager
- All Known Implementing Classes:
DatabaseManagerEntry
public interface DatabaseManager
Database manager can work with database version and upgraded state of perun DB.
- Author:
- Michal Stava email:<stavamichal@gmail.com>
-
Method Summary
Modifier and TypeMethodDescriptiongetCurrentDatabaseVersion
(PerunSession perunSession) Return current database version in string (ex. 3.0.1)Get DB driver information from datasource (name-version)Get DB information from datasource (name-version)long
Get time in ns "nanoseconds" of calling 1 simple update query to DB.
-
Method Details
-
getCurrentDatabaseVersion
Return current database version in string (ex. 3.0.1)- Returns:
- return current database version
- Throws:
PrivilegeException
-
getDatabaseDriverInformation
Get DB driver information from datasource (name-version)- Returns:
- string information about database driver
- Throws:
PrivilegeException
-
getDatabaseInformation
Get DB information from datasource (name-version)- Returns:
- string information about database
- Throws:
PrivilegeException
-
getTimeOfQueryPerformance
Get time in ns "nanoseconds" of calling 1 simple update query to DB. This query will update property for this purpose in configurations table.- Parameters:
sess
- user's session in Perun- Returns:
- time of processing query in nanoseconds
- Throws:
PrivilegeException
- wrong privilege to call this method
-