public class NonClusterConfigurationHelper extends Object implements ClusterConfigurationHelperInternal
ClusterConfigurationHelper
for use when clustering is not being used. Some methods may
throw exceptions if they are used, so isClusteredInstance()
should be used to check in advance if the other
methods are appropriate to use.Constructor and Description |
---|
NonClusterConfigurationHelper(com.atlassian.config.ApplicationConfig applicationConfig) |
Modifier and Type | Method and Description |
---|---|
void |
bootstrapCluster()
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,
String networkInterfaceName)
Deprecated.
|
void |
createCluster(String clusterName,
File clusterHome,
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.
|
com.atlassian.fugue.Option<ClusterJoinConfig> |
getJoinConfig()
Returns the configured join config if setup has progressed that far.
|
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()
Return the shared home directory if one has been configured.
|
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() |
void |
joinCluster(String clusterName,
File clusterHome,
InetAddress clusterAddress)
Deprecated.
|
void |
joinCluster(String clusterName,
File clusterHome,
InetAddress clusterAddress,
String networkInterfaceName)
Deprecated.
|
void |
joinCluster(String clusterName,
File clusterHome,
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()
Publish the configuration of this instance to the shared cluster cache, where
it can be loaded by subsequent nodes during setup.
|
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)
|
public NonClusterConfigurationHelper(com.atlassian.config.ApplicationConfig applicationConfig)
public boolean isClusteredInstance()
isClusteredInstance
in interface ClusterConfigurationHelper
@Deprecated public void joinCluster(String clusterName, File clusterHome, InetAddress clusterAddress)
joinCluster
in interface ClusterConfigurationHelper
@Deprecated public void joinCluster(String clusterName, File clusterHome, InetAddress clusterAddress, String networkInterfaceName)
joinCluster
in interface ClusterConfigurationHelper
@Deprecated public void joinCluster(String clusterName, File clusterHome, String networkInterfaceName, ClusterJoinConfig joinConfig) throws ClusterException
joinCluster
in interface ClusterConfigurationHelper
ClusterException
- if an error joining the cluster.@Deprecated public void createCluster(String clusterName, File clusterHome, InetAddress clusterAddress) throws ClusterException
ClusterConfigurationHelper
createCluster
in interface ClusterConfigurationHelper
ClusterException
- if an error setting up the cluster.@Deprecated public void createCluster(String clusterName, File clusterHome, InetAddress clusterAddress, String networkInterfaceName)
ClusterConfigurationHelper
createCluster
in interface ClusterConfigurationHelper
public void createCluster(String clusterName, File clusterHome, String networkInterfaceName, ClusterJoinConfig joinConfig) throws ClusterException
ClusterConfigurationHelper
createCluster
in interface ClusterConfigurationHelper
ClusterException
- if an error setting up the cluster.public void bootstrapCluster()
ClusterConfigurationHelper
bootstrapCluster
in interface ClusterConfigurationHelper
public void publishConfiguration()
ClusterConfigurationHelper
publishConfiguration
in interface ClusterConfigurationHelper
public List<NetworkInterface> getClusterableInterfaces()
ClusterConfigurationHelper
getClusterableInterfaces
in interface ClusterConfigurationHelper
NetworkInterface
objectspublic com.atlassian.fugue.Option<File> getSharedHome()
ClusterConfigurationHelper
getSharedHome
in interface ClusterConfigurationHelper
public com.atlassian.fugue.Option<ClusterJoinConfig> getJoinConfig()
ClusterConfigurationHelper
getJoinConfig
in interface ClusterConfigurationHelper
public void createSharedHome()
ClusterConfigurationHelperInternal
Shared home is created only if not clustering.
createSharedHome
in interface ClusterConfigurationHelperInternal
public void saveSetupConfigIntoSharedHome()
ClusterConfigurationHelperInternal
saveSetupConfigIntoSharedHome
in interface ClusterConfigurationHelperInternal
public void populateExistingClusterSetupConfig()
ClusterConfigurationHelperInternal
populateExistingClusterSetupConfig
in interface ClusterConfigurationHelperInternal
public void createClusterConfig()
ClusterConfigurationHelperInternal
createClusterConfig
in interface ClusterConfigurationHelperInternal
public void saveSharedProperty(Object key, Object value)
ClusterConfigurationHelperInternal
saveSharedProperty
in interface ClusterConfigurationHelperInternal
key
- the key of the propertyvalue
- the value of the propertypublic Optional<Object> getSharedProperty(Object key)
ClusterConfigurationHelperInternal
getSharedProperty
in interface ClusterConfigurationHelperInternal
key
- the key of the propertypublic void saveSharedBuildNumber(String sharedBuildNumber)
ClusterConfigurationHelperInternal
saveSharedBuildNumber
in interface ClusterConfigurationHelperInternal
sharedBuildNumber
- the shared build number to be savedpublic Optional<String> getSharedBuildNumber()
ClusterConfigurationHelperInternal
getSharedBuildNumber
in interface ClusterConfigurationHelperInternal
Copyright © 2003–2018 Atlassian. All rights reserved.