Interface PersistenceService

All Known Subinterfaces:
HotRestartService

public interface PersistenceService
Service for interacting with Persistence. For example - starting cluster-wide data backups, determining the local backup state and interrupting a currently running local backup.
Since:
5.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The prefix for each persistence backup directory.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Attempts to perform a cluster-wide data backup.
    void
    backup(long backupSeq)
    Attempts to perform a cluster-wide data backup.
    Returns the persistence backup directory.
    Returns the local backup task status (not the cluster backup status).
    void
    Interrupts the backup tasks on each cluster member if one is currently running.
    void
    Interrupts the local backup task if one is currently running.
    boolean
    Returns if backup is enabled.
  • Field Details

    • BACKUP_DIR_PREFIX

      static final String BACKUP_DIR_PREFIX
      The prefix for each persistence backup directory. The backup sequence is appended to this prefix.
      See Also:
  • Method Details

    • backup

      void backup()
      Attempts to perform a cluster-wide data backup. Each node will create a directory under the defined backup dir with the name BACKUP_DIR_PREFIX followed by the cluster time defined by this node. The backup request is performed transactionally. This method will throw an exception if another request (transaction) is already in progress. If a node is already performing a backup (there is a file indicating a backup is in progress), the node will only log a warning and ignore the backup request.
      Since:
      5.0
    • backup

      void backup(long backupSeq)
      Attempts to perform a cluster-wide data backup. Each node will create a directory under the defined backup dir with the name BACKUP_DIR_PREFIX followed by the backupSeq. The backup request is performed transactionally. This method will throw an exception if another request (transaction) is already in progress. If a node is already performing a backup (there is a file indicating a backup is in progress), the node will only log a warning and ignore the backup request.
      Parameters:
      backupSeq - the suffix of the backup directory for this cluster backup
      Since:
      5.0
    • getBackupTaskStatus

      BackupTaskStatus getBackupTaskStatus()
      Returns the local backup task status (not the cluster backup status).
      Since:
      5.0
    • interruptLocalBackupTask

      void interruptLocalBackupTask()
      Interrupts the local backup task if one is currently running. The contents of the target backup directory will be left as-is.
      Since:
      5.0
    • interruptBackupTask

      void interruptBackupTask()
      Interrupts the backup tasks on each cluster member if one is currently running. The contents of the target backup directories will be left as-is.
      Since:
      5.0
    • isBackupEnabled

      boolean isBackupEnabled()
      Returns if backup is enabled.
      Returns:
      true if backup is enabled, false otherwise
      Since:
      5.0
    • getBackupDirectory

      String getBackupDirectory()
      Returns the persistence backup directory.
      Returns:
      persistence backup directory if backup is enabled, null otherwise.
      Since:
      5.0