Class DerbyManager

java.lang.Object
com.jalios.jcms.db.DerbyManager
All Implemented Interfaces:
JcmsConstants, JaliosConstants

public class DerbyManager extends Object implements JcmsConstants
This class manages the internal Derby server.
Since:
jcms-6.0.0
Author:
Olivier Dedieu
  • Method Details

    • getInstance

      public static DerbyManager getInstance()
    • checkServerConnection

      public boolean checkServerConnection()
      Returns true if the connections with Derby can be established.
      Returns:
      true if the connections with Derby can be established.
      Since:
      jcms-7.0.0
    • getDerbyPath

      public String getDerbyPath()
    • getJdbcUrl

      public String getJdbcUrl()
      Returns the JDBC URL to access the internal Derby Server.
      Returns:
      the JDBC URL to access the internal Derby Server.
      Since:
      jcms-6.0.0
    • isServerStarted

      public boolean isServerStarted()
      Returns true if internal Derby server has been started.
      Returns:
      true if internal Derby server has been started.
      Since:
      jcms-6.0.0
    • getServerPort

      public int getServerPort()
      Returns the port of the Derby server.
      Returns:
      the port of the Derby server.
      Since:
      jcms-6.0.0
    • isBackupEnabled

      public boolean isBackupEnabled()
      Returns true if the backup is enabled.
      Returns:
      true if the backup is enabled.
      Since:
      jcms-6.0.0
    • getBackupSchedule

      public String getBackupSchedule()
      Returns the backup schedule (JDring/cron syntax).
      Returns:
      the backup schedule.
      Since:
      jcms-6.0.0
    • getBackupDir

      public File getBackupDir()
      Returns the backup directory.
      Returns:
      the backup directory.
      Since:
      jcms-6.0.0
    • getSysInfo

      public String getSysInfo()
      Returns information about the running Derby Server.
      Returns:
      information about the running Derby Server.
      Since:
      jcms-6.0.0
    • getRuntimeInfo

      public String getRuntimeInfo()
      Returns runtime information about the running Derby Server.
      Returns:
      runtime information about the running Derby Server.
      Since:
      jcms-6.0.0
    • freezeDatabase

      public void freezeDatabase()
      Freezes the database.
      Since:
      jcms-6.0.0
    • unfreezeDatabase

      public void unfreezeDatabase()
      Unfreezes the database.
      Since:
      jcms-6.0.0
    • backupDatabase

      public void backupDatabase(String backupdirectory)
      Backups the database.
      Parameters:
      backupdirectory - the path of the backup directory
      Since:
      jcms-6.0.0
    • shutdown

      public void shutdown()
      Shutdown the internal Derby server
      Since:
      jcms-6.0.0
    • performBackup

      public void performBackup()
      Performs a backup of the database and save the backup as a zip file in the backup directory.
      Since:
      jcms-6.0.0