@ParametersAreNonnullByDefault public class DefaultClusterConfigurationHelper extends Object implements ClusterConfigurationHelper, 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_AWS |
static String |
CLUSTER_AWS_ACCESS_KEY |
static String |
CLUSTER_AWS_HOST_HEADER |
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_NAME |
static String |
CLUSTER_PEERS |
static String |
CLUSTER_TTL |
static String |
SHARED_HOME |
Constructor and Description |
---|
DefaultClusterConfigurationHelper(com.atlassian.config.ApplicationConfig applicationConfig,
ClusterManager clusterManager,
LicenseService licenseService) |
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 |
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.
|
com.atlassian.fugue.Option<File> |
getSharedHome()
Return the shared home directory if one has been configured.
|
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 |
publishConfiguration()
Deprecated.
since 5.9
|
public 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_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_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 DefaultClusterConfigurationHelper(com.atlassian.config.ApplicationConfig applicationConfig, ClusterManager clusterManager, LicenseService licenseService)
public boolean isClusteredInstance()
isClusteredInstance
in interface ClusterConfigurationHelper
@Deprecated public void joinCluster(String clusterName, File clusterHome, InetAddress clusterAddress) throws ClusterException
joinCluster
in interface ClusterConfigurationHelper
ClusterException
- if an error joining the cluster.@Deprecated public void joinCluster(String clusterName, File clusterHome, InetAddress clusterAddress, @Nullable String networkInterfaceName) throws ClusterException
joinCluster
in interface ClusterConfigurationHelper
ClusterException
- if an error joining the cluster.@Deprecated public void joinCluster(String clusterName, File clusterHome, @Nullable 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, @Nullable String networkInterfaceName) throws ClusterException
ClusterConfigurationHelper
createCluster
in interface ClusterConfigurationHelper
ClusterException
- if an error setting up the cluster.public void createCluster(String clusterName, File clusterHome, @Nullable String networkInterfaceName, ClusterJoinConfig joinConfig) throws ClusterException
ClusterConfigurationHelper
createCluster
in interface ClusterConfigurationHelper
ClusterException
- if an error setting up the cluster.public void bootstrapCluster() throws ClusterException
ClusterConfigurationHelper
bootstrapCluster
in interface ClusterConfigurationHelper
ClusterException
- if there was an error configuring the cluster manager,
or if the licensed nodes were exceeded by joining the cluster.@Deprecated 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 void createSharedHome()
ClusterConfigurationHelperInternal
Shared home is created only if not clustering.
createSharedHome
in interface ClusterConfigurationHelperInternal
public com.atlassian.fugue.Option<ClusterJoinConfig> getJoinConfig()
ClusterConfigurationHelper
getJoinConfig
in interface ClusterConfigurationHelper
Copyright © 2003–2016 Atlassian. All rights reserved.