@ParametersAreNonnullByDefault public class DefaultClusterConfigurationHelper extends Object implements ClusterConfigurationHelperInternal
ClusterConfigurationHelper which assumes that a cluster of some sort is being used. The
 specifics of the underlying clustering technology are handled by the ClusterManager. If no cluster is being
 used, then this class is not appropriate, and NonClusterConfigurationHelper
 should be used instead.| Modifier and Type | Field and Description | 
|---|---|
static String | 
CLUSTER  | 
static String | 
CLUSTER_ADDRESS  | 
static String | 
CLUSTER_AUTHENTICATION_ENABLED  | 
static String | 
CLUSTER_AUTHENTICATION_ENABLED_DEFAULT_VAL  | 
static String | 
CLUSTER_AUTHENTICATION_SECRET  | 
static String | 
CLUSTER_AWS  | 
static String | 
CLUSTER_AWS_ACCESS_KEY  | 
static String | 
CLUSTER_AWS_HOST_HEADER  | 
static String | 
CLUSTER_AWS_IAM_ROLE  | 
static String | 
CLUSTER_AWS_REGION  | 
static String | 
CLUSTER_AWS_SECRET_KEY  | 
static String | 
CLUSTER_AWS_SECURITY_GROUP_NAME  | 
static String | 
CLUSTER_AWS_TAG_KEY  | 
static String | 
CLUSTER_AWS_TAG_VALUE  | 
static String | 
CLUSTER_HOME  | 
static String | 
CLUSTER_INTERFACE  | 
static String | 
CLUSTER_JOIN_TYPE  | 
static String | 
CLUSTER_MULTICAST_PORT_SYS_PROP  | 
static String | 
CLUSTER_NAME  | 
static String | 
CLUSTER_PEERS  | 
static Set<String> | 
CLUSTER_SETUP_ENTRIES  | 
static String | 
CLUSTER_TTL  | 
static String | 
SHARED_HOME  | 
static List<String> | 
SUPPORTED_SHARED_HOME_CONFIG_PROPERTIES  | 
| Constructor and Description | 
|---|
DefaultClusterConfigurationHelper(com.atlassian.config.ApplicationConfig applicationConfig,
                                 ClusterManager clusterManager,
                                 LicenseServiceInternal licenseService,
                                 com.atlassian.config.db.DatabaseHelper databaseHelper,
                                 com.atlassian.config.db.HibernateConfig hibernateConfig,
                                 ClusterCompatibilityValidator clusterCompatibilityValidator)
Deprecated. 
 
since 7.17.3,
 Replaced by  
DefaultClusterConfigurationHelper(
             applicationConfig,
             clusterManager,
             licenseService,
             databaseHelper,
             hibernateConfig,
             clusterCompatibilityValidator,
             secureTokenGenerator) | 
DefaultClusterConfigurationHelper(com.atlassian.config.ApplicationConfig applicationConfig,
                                 ClusterManager clusterManager,
                                 LicenseServiceInternal licenseService,
                                 com.atlassian.config.db.DatabaseHelper databaseHelper,
                                 com.atlassian.config.db.HibernateConfig hibernateConfig,
                                 ClusterCompatibilityValidator clusterCompatibilityValidator,
                                 com.atlassian.security.random.SecureTokenGenerator secureTokenGenerator)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
bootstrapCluster()
Checks whether clustering is enabled, and bootstraps the cluster manager with
 an appropriate configuration 
 | 
void | 
bootstrapCluster(BootstrapDatabaseAccessor.BootstrapDatabaseData bootstrapDatabaseData)
Checks whether clustering is enabled, and bootstraps the cluster manager with
 an appropriate configuration 
 | 
void | 
createCluster(String clusterName,
             File clusterHome,
             InetAddress clusterAddress)
Deprecated.  
 | 
void | 
createCluster(String clusterName,
             File clusterHome,
             InetAddress clusterAddress,
             @Nullable String networkInterfaceName)
Deprecated.  
 | 
void | 
createCluster(String clusterName,
             File clusterHome,
             @Nullable String networkInterfaceName,
             ClusterJoinConfig joinConfig)
Creates a new cluster with the given name, on the specified network interface,
 as long as the given cluster does not exist. 
 | 
void | 
createClusterConfig()
Creates and sets up the cluster config file in the shared home if it doesn't already exist. 
 | 
void | 
createSharedHome()
Creates shared home directory if it does not exist already. 
 | 
List<NetworkInterface> | 
getClusterableInterfaces()
Return a list of interfaces suitable for clustered communication. 
 | 
protected Optional<com.atlassian.config.ApplicationConfig> | 
getClusterApplicationConfig()  | 
com.atlassian.fugue.Option<ClusterJoinConfig> | 
getJoinConfig()
Deprecated. 
 
since 7.0.1. Use  
ClusterConfigurationHelper.joinConfig() | 
Optional<String> | 
getSharedBuildNumber()
Get the build number stored in the confluence.cfg.xml file in the shared home folder 
 | 
com.atlassian.fugue.Option<File> | 
getSharedHome()
Deprecated. 
 
since 7.0.1. Use  
ClusterConfigurationHelper.sharedHome() | 
Optional<Object> | 
getSharedProperty(Object key)
Get the value of a property stored in the confluence.cfg.xml config file (in the shared home folder) 
 | 
boolean | 
isClusteredInstance()  | 
boolean | 
isClusterHomeConfigured()  | 
void | 
joinCluster(String clusterName,
           File clusterHome,
           InetAddress clusterAddress)
Deprecated.  
 | 
void | 
joinCluster(String clusterName,
           File clusterHome,
           InetAddress clusterAddress,
           @Nullable String networkInterfaceName)
Deprecated.  
 | 
void | 
joinCluster(String clusterName,
           File clusterHome,
           @Nullable String networkInterfaceName,
           ClusterJoinConfig joinConfig)
Deprecated.  
 | 
void | 
populateExistingClusterSetupConfig()
Merges the config file in shared home into the current config file (in local home folder). 
 | 
void | 
publishConfiguration()
Deprecated. 
 
since 5.9 
 | 
void | 
saveSetupConfigIntoSharedHome()
This method need to be trigger when we finish setup. 
 | 
void | 
saveSharedBuildNumber(String sharedBuildNumber)
Store the build number into the confluence.cfg.xml file in the shared home folder 
 | 
void | 
saveSharedProperty(Object key,
                  Object value)
Save a property into the shared confluence.cfg.xml config file (in the shared home folder) 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitjoinConfig, sharedHomepublic static final String CLUSTER
public static final String CLUSTER_NAME
public static final String CLUSTER_INTERFACE
public static final String CLUSTER_JOIN_TYPE
public static final String CLUSTER_ADDRESS
public static final String CLUSTER_TTL
public static final String CLUSTER_MULTICAST_PORT_SYS_PROP
public static final String CLUSTER_PEERS
public static final String CLUSTER_AWS
public static final String CLUSTER_AWS_ACCESS_KEY
public static final String CLUSTER_AWS_SECRET_KEY
public static final String CLUSTER_AWS_IAM_ROLE
public static final String CLUSTER_AWS_TAG_KEY
public static final String CLUSTER_AWS_TAG_VALUE
public static final String CLUSTER_AWS_REGION
public static final String CLUSTER_AWS_HOST_HEADER
public static final String CLUSTER_AWS_SECURITY_GROUP_NAME
public static final String CLUSTER_HOME
public static final String SHARED_HOME
public static final String CLUSTER_AUTHENTICATION_ENABLED
public static final String CLUSTER_AUTHENTICATION_ENABLED_DEFAULT_VAL
public static final String CLUSTER_AUTHENTICATION_SECRET
public static final List<String> SUPPORTED_SHARED_HOME_CONFIG_PROPERTIES
public DefaultClusterConfigurationHelper(com.atlassian.config.ApplicationConfig applicationConfig,
                                         ClusterManager clusterManager,
                                         LicenseServiceInternal licenseService,
                                         com.atlassian.config.db.DatabaseHelper databaseHelper,
                                         com.atlassian.config.db.HibernateConfig hibernateConfig,
                                         ClusterCompatibilityValidator clusterCompatibilityValidator,
                                         com.atlassian.security.random.SecureTokenGenerator secureTokenGenerator)
@Deprecated public DefaultClusterConfigurationHelper(com.atlassian.config.ApplicationConfig applicationConfig, ClusterManager clusterManager, LicenseServiceInternal licenseService, com.atlassian.config.db.DatabaseHelper databaseHelper, com.atlassian.config.db.HibernateConfig hibernateConfig, ClusterCompatibilityValidator clusterCompatibilityValidator)
DefaultClusterConfigurationHelper(
             applicationConfig,
             clusterManager,
             licenseService,
             databaseHelper,
             hibernateConfig,
             clusterCompatibilityValidator,
             secureTokenGenerator)protected Optional<com.atlassian.config.ApplicationConfig> getClusterApplicationConfig()
public void createClusterConfig()
ClusterConfigurationHelperInternalcreateClusterConfig in interface ClusterConfigurationHelperInternalpublic void populateExistingClusterSetupConfig()
ClusterConfigurationHelperInternalpopulateExistingClusterSetupConfig in interface ClusterConfigurationHelperInternalpublic void saveSharedProperty(Object key, Object value)
ClusterConfigurationHelperInternalsaveSharedProperty in interface ClusterConfigurationHelperInternalkey - the key of the propertyvalue - the value of the propertypublic Optional<Object> getSharedProperty(Object key)
ClusterConfigurationHelperInternalgetSharedProperty in interface ClusterConfigurationHelperInternalkey - the key of the propertypublic void saveSharedBuildNumber(String sharedBuildNumber)
ClusterConfigurationHelperInternalsaveSharedBuildNumber in interface ClusterConfigurationHelperInternalsharedBuildNumber - the shared build number to be savedpublic Optional<String> getSharedBuildNumber()
ClusterConfigurationHelperInternalgetSharedBuildNumber in interface ClusterConfigurationHelperInternalpublic void saveSetupConfigIntoSharedHome()
ClusterConfigurationHelperInternalsaveSetupConfigIntoSharedHome in interface ClusterConfigurationHelperInternalpublic boolean isClusteredInstance()
isClusteredInstance in interface ClusterConfigurationHelperpublic boolean isClusterHomeConfigured()
isClusterHomeConfigured in interface ClusterConfigurationHelper@Deprecated public void joinCluster(String clusterName, File clusterHome, InetAddress clusterAddress) throws ClusterException
joinCluster in interface ClusterConfigurationHelperClusterException - if an error joining the cluster.@Deprecated public void joinCluster(String clusterName, File clusterHome, InetAddress clusterAddress, @Nullable String networkInterfaceName) throws ClusterException
joinCluster in interface ClusterConfigurationHelperClusterException - if an error joining the cluster.@Deprecated public void joinCluster(String clusterName, File clusterHome, @Nullable String networkInterfaceName, ClusterJoinConfig joinConfig) throws ClusterException
joinCluster in interface ClusterConfigurationHelperClusterException - if an error joining the cluster.@Deprecated public void createCluster(String clusterName, File clusterHome, InetAddress clusterAddress) throws ClusterException
ClusterConfigurationHelpercreateCluster in interface ClusterConfigurationHelperClusterException - if an error setting up the cluster.@Deprecated public void createCluster(String clusterName, File clusterHome, InetAddress clusterAddress, @Nullable String networkInterfaceName) throws ClusterException
ClusterConfigurationHelpercreateCluster in interface ClusterConfigurationHelperClusterException - if an error setting up the cluster.public void createCluster(String clusterName, File clusterHome, @Nullable String networkInterfaceName, ClusterJoinConfig joinConfig) throws ClusterException
ClusterConfigurationHelpercreateCluster in interface ClusterConfigurationHelperClusterException - if an error setting up the cluster.public void bootstrapCluster(BootstrapDatabaseAccessor.BootstrapDatabaseData bootstrapDatabaseData) throws ClusterException
ClusterConfigurationHelperbootstrapCluster in interface ClusterConfigurationHelperbootstrapDatabaseData - contains the build number and cluster upgrade state information to decide whether this node can joinClusterException - if there was an error configuring the cluster manager,
                          or if the licensed nodes were exceeded by joining the cluster.public void bootstrapCluster()
                      throws ClusterException
ClusterConfigurationHelperbootstrapCluster in interface ClusterConfigurationHelperClusterException - if there was an error configuring the cluster manager,
                          or if the licensed nodes were exceeded by joining the cluster.@Deprecated public void publishConfiguration()
ClusterConfigurationHelperpublishConfiguration in interface ClusterConfigurationHelperpublic List<NetworkInterface> getClusterableInterfaces()
ClusterConfigurationHelpergetClusterableInterfaces in interface ClusterConfigurationHelperNetworkInterface objects@Deprecated public com.atlassian.fugue.Option<File> getSharedHome()
ClusterConfigurationHelper.sharedHome()ClusterConfigurationHelpergetSharedHome in interface ClusterConfigurationHelperpublic void createSharedHome()
ClusterConfigurationHelperInternalShared home is created only if not clustering.
createSharedHome in interface ClusterConfigurationHelperInternal@Deprecated public com.atlassian.fugue.Option<ClusterJoinConfig> getJoinConfig()
ClusterConfigurationHelper.joinConfig()ClusterConfigurationHelpergetJoinConfig in interface ClusterConfigurationHelperCopyright © 2003–2022 Atlassian. All rights reserved.