com.hazelcast.hotrestart

## Class NoopInternalHotRestartService

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

- All Implemented Interfaces:
    InternalHotRestartService

      public class NoopInternalHotRestartService
      extends Object
      implements InternalHotRestartService

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NoopInternalHotRestartService()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `forceStartBeforeJoin()` Executes force-start process, resets local hot restart data and member gets a new UUID.
    `com.hazelcast.internal.management.dto.ClusterHotRestartStatusDTO` | `getCurrentClusterHotRestartStatus()` Returns latest Hot Restart status as Management Center DTO.
    `Set<String>` | `getExcludedMemberUuids()` Returns UUIDs of the members that have been excluded during the cluster start.
    `void` | `handleExcludedMemberUuids(Address sender, Set<String> excludedMemberUuids)` Handles the UUID set of excluded members only if this member is also excluded, and triggers the member force start process.
    `boolean` | `isEnabled()` Returns whether hot-restart is enabled or not.
    `boolean` | `isMemberExcluded(Address memberAddress, String memberUuid)` Checks if the given member has been excluded during the cluster start or not.
    `void` | `notifyExcludedMember(Address memberAddress)` Notifies the excluded member and triggers the member force start process.
    `void` | `resetService(boolean isAfterJoin)` Resets local service data, removes hot restart directories and recreates them.
    `boolean` | `triggerForceStart()` Forces node to start by skipping hot-restart completely and removing all hot-restart data even if node is still on validation phase or loading hot-restart data.
    `boolean` | `triggerPartialStart()` Triggers partial start if the cluster cannot be started with full recovery and `HotRestartPersistenceConfig.clusterDataRecoveryPolicy` is set accordingly.
    `void` | `waitPartitionReplicaSyncOnCluster(long timeout, TimeUnit unit)` Waits until partition replicas (primaries and backups) get in sync.

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

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

- - ### Constructor Detail

    - #### NoopInternalHotRestartService

          public NoopInternalHotRestartService()

  - ### Method Detail

    - #### isEnabled

          public boolean isEnabled()

      Description copied from interface: `InternalHotRestartService`
      Returns whether hot-restart is enabled or not.
      Specified by:
        `isEnabled` in interface `InternalHotRestartService`

    - #### triggerForceStart

          public boolean triggerForceStart()

      Description copied from interface: `InternalHotRestartService`
      Forces node to start by skipping hot-restart completely and removing all hot-restart data even if node is still on validation phase or loading hot-restart data.
      Specified by:
        `triggerForceStart` in interface `InternalHotRestartService`
      Returns:
        true if force start is triggered successfully. force start cannot be triggered if hot restart is disabled or the master is not known yet

    - #### triggerPartialStart

          public boolean triggerPartialStart()

      Description copied from interface: `InternalHotRestartService`
      Triggers partial start if the cluster cannot be started with full recovery and `HotRestartPersistenceConfig.clusterDataRecoveryPolicy` is set accordingly.
      Specified by:
        `triggerPartialStart` in interface `InternalHotRestartService`
      Returns:
        true if partial start is triggered.

    - #### isMemberExcluded

          public boolean isMemberExcluded(Address memberAddress,
                                          String memberUuid)

      Description copied from interface: `InternalHotRestartService`
      Checks if the given member has been excluded during the cluster start or not. If returns true, it means that the given member is not allowed to join to the cluster.
      Specified by:
        `isMemberExcluded` in interface `InternalHotRestartService`
      Parameters:
        `memberAddress` - address of the member to check
        `memberUuid` - UUID of the member to check
      Returns:
        true if the member has been excluded on cluster start.

    - #### getExcludedMemberUuids

          public Set<String> getExcludedMemberUuids()

      Description copied from interface: `InternalHotRestartService`
      Returns UUIDs of the members that have been excluded during the cluster start.
      Specified by:
        `getExcludedMemberUuids` in interface `InternalHotRestartService`
      Returns:
        UUIDs of the members that have been excluded during the cluster start

    - #### notifyExcludedMember

          public void notifyExcludedMember(Address memberAddress)

      Description copied from interface: `InternalHotRestartService`
      Notifies the excluded member and triggers the member force start process.
      Specified by:
        `notifyExcludedMember` in interface `InternalHotRestartService`
      Parameters:
        `memberAddress` - address of the member to notify

    - #### handleExcludedMemberUuids

          public void handleExcludedMemberUuids(Address sender,
                                                Set<String> excludedMemberUuids)

      Description copied from interface: `InternalHotRestartService`
      Handles the UUID set of excluded members only if this member is also excluded, and triggers the member force start process.
      Specified by:
        `handleExcludedMemberUuids` in interface `InternalHotRestartService`
      Parameters:
        `sender` - the member that has sent the excluded members set
        `excludedMemberUuids` - UUIDs of the members that have been excluded during the cluster start

    - #### getCurrentClusterHotRestartStatus

          public com.hazelcast.internal.management.dto.ClusterHotRestartStatusDTO getCurrentClusterHotRestartStatus()

      Description copied from interface: `InternalHotRestartService`
      Returns latest Hot Restart status as Management Center DTO. An empty status object will be returned if Hot Restart is not available (not EE) or not enabled.
      Specified by:
        `getCurrentClusterHotRestartStatus` in interface `InternalHotRestartService`

    - #### resetService

          public void resetService(boolean isAfterJoin)

      Description copied from interface: `InternalHotRestartService`
      Resets local service data, removes hot restart directories and recreates them.
      Specified by:
        `resetService` in interface `InternalHotRestartService`
      Parameters:
        `isAfterJoin` - true if this is called after node joins the cluster, false otherwise

    - #### forceStartBeforeJoin

          public void forceStartBeforeJoin()

      Description copied from interface: `InternalHotRestartService`
      Executes force-start process, resets local hot restart data and member gets a new UUID.

      If the local node has already completed the start process or it isn't excluded in cluster start, this method fails with an exception.

      Specified by:
        `forceStartBeforeJoin` in interface `InternalHotRestartService`

    - #### waitPartitionReplicaSyncOnCluster

          public void waitPartitionReplicaSyncOnCluster(long timeout,
                                                        TimeUnit unit)

      Description copied from interface: `InternalHotRestartService`
      Waits until partition replicas (primaries and backups) get in sync.
      Specified by:
        `waitPartitionReplicaSyncOnCluster` in interface `InternalHotRestartService`
      Parameters:
        `timeout` - timeout
        `unit` - time unit

Copyright © 2019. All rights reserved.