com.hazelcast.hotrestart

## Interface InternalHotRestartService

- All Known Implementing Classes:
    NoopInternalHotRestartService

      public interface InternalHotRestartService

  Internal service for interacting with hot restart related functionalities (e.g. force and partial start)

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `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` | `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` | `resetHotRestartData()` Resets local hot restart data and gets a new UUID, if the local node hasn't completed the start process and it is excluded in cluster start.
    `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.

- - ### Method Detail

    - #### triggerForceStart

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

          boolean triggerPartialStart()

      Triggers partial start if the cluster cannot be started with full recovery and `HotRestartPersistenceConfig.clusterDataRecoveryPolicy` is set accordingly.
      Returns:
        true if partial start is triggered.

    - #### isMemberExcluded

          boolean isMemberExcluded(Address memberAddress,
                                   String memberUuid)

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

          Set<String> getExcludedMemberUuids()

      Returns UUIDs of the members that have been excluded during the cluster start.
      Returns:
        UUIDs of the members that have been excluded during the cluster start

    - #### notifyExcludedMember

          void notifyExcludedMember(Address memberAddress)

      Notifies the excluded member and triggers the member force start process.
      Parameters:
        `memberAddress` - address of the member to notify

    - #### handleExcludedMemberUuids

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

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

      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.

    - #### resetHotRestartData

          void resetHotRestartData()

      Resets local hot restart data and gets a new UUID, if the local node hasn't completed the start process and it is excluded in cluster start.

    - #### waitPartitionReplicaSyncOnCluster

          void waitPartitionReplicaSyncOnCluster(long timeout,
                                                 TimeUnit unit)

      Waits until partition replicas (primaries and backups) get in sync.
      Parameters:
        `timeout` - timeout
        `unit` - time unit
      Throws:
        `IllegalStateException` - when timeout happens or a member leaves the cluster while waiting

Copyright © 2018. All rights reserved.