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 Details

    • getCurrentDatabaseVersion

      String getCurrentDatabaseVersion(PerunSession perunSession) throws PrivilegeException
      Return current database version in string (ex. 3.0.1)
      Returns:
      return current database version
      Throws:
      PrivilegeException
    • getDatabaseDriverInformation

      String getDatabaseDriverInformation(PerunSession sess) throws PrivilegeException
      Get DB driver information from datasource (name-version)
      Returns:
      string information about database driver
      Throws:
      PrivilegeException
    • getDatabaseInformation

      String getDatabaseInformation(PerunSession sess) throws PrivilegeException
      Get DB information from datasource (name-version)
      Returns:
      string information about database
      Throws:
      PrivilegeException
    • getTimeOfQueryPerformance

      long getTimeOfQueryPerformance(PerunSession sess) throws PrivilegeException
      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