public class

DisasterRecoveryLauncher

extends Object
implements JiraLauncher
java.lang.Object
   ↳ com.atlassian.jira.index.ha.DisasterRecoveryLauncher

Class Overview

This class will check for a disaster recovery scenario and restore the index if required.

Summary

Nested Classes
enum DisasterRecoveryLauncher.RecoveryMode  
Public Constructors
DisasterRecoveryLauncher()
Public Methods
void earlyStart()
Clearing of the cluster locks needs to happen before plugin load as plugins may take locks during initialisation.
DisasterRecoveryLauncher.RecoveryMode getRecoveryMode()
Returns the recovery mode of the instance.
void start()
Called during JIRA "startup".
void stop()
Called when JIRA is shutting down.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.startup.JiraLauncher

Public Constructors

public DisasterRecoveryLauncher ()

Public Methods

public void earlyStart ()

Clearing of the cluster locks needs to happen before plugin load as plugins may take locks during initialisation.

public DisasterRecoveryLauncher.RecoveryMode getRecoveryMode ()

Returns the recovery mode of the instance. This is one of:

  • PRIMARY - the main JIRA instance, which has no special DR configuration set
  • SECONDARY - the recovery instance as indicated by the disaster.recovery property being true
  • COLD - a secondary instance on initialisation. This indicates an instance that is currently doing work to recover after which it will report itself as SECONDARY

Returns
  • the active recovery mode

public void start ()

Called during JIRA "startup". Despite no longer being multitenant, it is still a good idea to chunk this. The order is defined in DefaultJiraLauncher

The logic for ordering all of this will be handled by the DefaultJiraLauncher.

public void stop ()

Called when JIRA is shutting down. Just like startup this can . The logic of what exactly happens when is encapsulated in the DefaultJiraLauncher.