com.hazelcast.hotrestart

## Class NoOpHotRestartService

- java.lang.Object
- - com.hazelcast.hotrestart.NoOpHotRestartService

- All Implemented Interfaces:
    HotRestartService

      public class NoOpHotRestartService
      extends Object
      implements HotRestartService

  Empty implementation of HotRestartService to avoid null checks. This will provide default behaviour when hot restart is not available or not enabled.

- - ### Field Summary

    - ### Fields inherited from interface com.hazelcast.hotrestart.HotRestartService

      `BACKUP_DIR_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NoOpHotRestartService()`

  - ### Method Summary

    All Methods Instance Methods Concrete 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.
    `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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NoOpHotRestartService

          public NoOpHotRestartService()

  - ### Method Detail

    - #### backup

          public void backup()

      Description copied from interface: `HotRestartService`
      Attempts to perform a cluster hot restart data backup. Each node will create a directory under the defined backup dir with the name `HotRestartService.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.
      Specified by:
        `backup` in interface `HotRestartService`

    - #### backup

          public void backup(long backupSeq)

      Description copied from interface: `HotRestartService`
      Attempts to perform a cluster hot restart data backup. Each node will create a directory under the defined backup dir with the name `HotRestartService.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.
      Specified by:
        `backup` in interface `HotRestartService`
      Parameters:
        `backupSeq` - the suffix of the backup directory for this cluster hot restart backup

    - #### getBackupTaskStatus

          public BackupTaskStatus getBackupTaskStatus()

      Description copied from interface: `HotRestartService`
      Returns the local hot restart backup task status (not the cluster backup status).
      Specified by:
        `getBackupTaskStatus` in interface `HotRestartService`

    - #### interruptLocalBackupTask

          public void interruptLocalBackupTask()

      Description copied from interface: `HotRestartService`
      Interrupts the local backup task if one is currently running. The contents of the target backup directory will be left as-is.
      Specified by:
        `interruptLocalBackupTask` in interface `HotRestartService`

    - #### interruptBackupTask

          public void interruptBackupTask()

      Description copied from interface: `HotRestartService`
      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.
      Specified by:
        `interruptBackupTask` in interface `HotRestartService`

    - #### isHotBackupEnabled

          public boolean isHotBackupEnabled()

      Description copied from interface: `HotRestartService`
      Returns if hot backup is enabled.
      Specified by:
        `isHotBackupEnabled` in interface `HotRestartService`
      Returns:
        `true` if hot backup is enabled, `false` otherwise

Copyright © 2018. All rights reserved.