com.hazelcast.hotrestart

## Interface HotRestartService

- All Known Implementing Classes:
    NoOpHotRestartService

      public interface HotRestartService

  Service for interacting with Hot Restart. For example - starting cluster-wide hot restart data backups, determining the local backup state and interrupting a currently running local hot restart backup.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `BACKUP_DIR_PREFIX` The prefix for each hot restart backup directory.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `backup()` Attempts to perform a cluster hot restart data backup.
    `void` | `backup(long backupSeq)` Attempts to perform a cluster hot restart data backup.
    `String` | `getBackupDirectory()` Returns the hot restart backup directory.
    `BackupTaskStatus` | `getBackupTaskStatus()` Returns the local hot restart backup task status (not the cluster backup status).
    `void` | `interruptBackupTask()` Interrupts the backup tasks on each cluster member if one is currently running.
    `void` | `interruptLocalBackupTask()` Interrupts the local backup task if one is currently running.
    `boolean` | `isHotBackupEnabled()` Returns if hot backup is enabled.

- - ### Field Detail

    - #### BACKUP_DIR_PREFIX

          static final String BACKUP_DIR_PREFIX

      The prefix for each hot restart backup directory. The backup sequence is appended to this prefix.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### backup

          void backup()

      Attempts to perform a cluster hot restart 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 an 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.

    - #### backup

          void backup(long backupSeq)

      Attempts to perform a cluster hot restart 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 an 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 hot restart backup

    - #### getBackupTaskStatus

          BackupTaskStatus getBackupTaskStatus()

      Returns the local hot restart backup task status (not the cluster backup status).

    - #### 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.

    - #### 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.

    - #### isHotBackupEnabled

          boolean isHotBackupEnabled()

      Returns if hot backup is enabled.
      Returns:
        `true` if hot backup is enabled, `false` otherwise

    - #### getBackupDirectory

          String getBackupDirectory()

      Returns the hot restart backup directory.
      Returns:
        hot restart backup directory if hot backup is enabled, `null` otherwise.

Copyright © 2019. All rights reserved.