public class

SecondaryJiraHome

extends AbstractJiraHome
java.lang.Object
   ↳ com.atlassian.jira.config.util.AbstractJiraHome
     ↳ com.atlassian.jira.config.util.SecondaryJiraHome

Class Overview

Secondary JIRA Home to allow replication of everything to a different location for disaster recovery

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.config.util.JiraHome
[Expand]
Inherited Fields
From interface com.atlassian.jira.config.util.JiraHome
Public Constructors
SecondaryJiraHome(JiraHome jirahome, ApplicationProperties applicationProperties, ClusterManager clusterManager, EventPublisher eventPublisher)
Public Methods
void applySettings(boolean attachments, boolean plugins, boolean indexSnapshots, boolean avatars)
Applies all the settings for the replication home
String getDefaultPath()
We map the second default path inside the Jira Home because if you are in a cluster this is the shared home and it is already mapped in all the instances We also keep the same structure as the default Jira Home to be able to use this location as primary in disaster recovery
@Nonnull File getLocalHome()
boolean isEnabled()
void setEnabled(boolean value)
Protected Methods
void refreshLocation(boolean isEnabled)
We refresh the location, we do this to only enable this if the feature is enabled.
[Expand]
Inherited Methods
From class com.atlassian.jira.config.util.AbstractJiraHome
From class java.lang.Object
From interface com.atlassian.jira.config.util.JiraHome

Public Constructors

public SecondaryJiraHome (JiraHome jirahome, ApplicationProperties applicationProperties, ClusterManager clusterManager, EventPublisher eventPublisher)

Public Methods

public void applySettings (boolean attachments, boolean plugins, boolean indexSnapshots, boolean avatars)

Applies all the settings for the replication home

Parameters
attachments attachments enabled
plugins plugins enabled
indexSnapshots index snapshot enabled
avatars avatars enabled

public String getDefaultPath ()

We map the second default path inside the Jira Home because if you are in a cluster this is the shared home and it is already mapped in all the instances We also keep the same structure as the default Jira Home to be able to use this location as primary in disaster recovery

Returns
  • the default attachment path for the secondary

@Nonnull public File getLocalHome ()

public boolean isEnabled ()

public void setEnabled (boolean value)

Protected Methods

protected void refreshLocation (boolean isEnabled)

We refresh the location, we do this to only enable this if the feature is enabled. If someone tries to use the secondary home the location will be null, if it is not enabled by this API