|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.cluster.DefaultClusterConfigurationHelper
@ParametersAreNonnullByDefault public class DefaultClusterConfigurationHelper
An implementation of 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.
Field Summary | |
---|---|
static String |
CLUSTER
|
static String |
CLUSTER_ADDRESS
|
static String |
CLUSTER_HOME
|
static String |
CLUSTER_INTERFACE
|
static String |
CLUSTER_NAME
|
static String |
CLUSTER_TOUCH_TIME
|
static String |
CLUSTER_TTL
|
Constructor Summary | |
---|---|
DefaultClusterConfigurationHelper(com.atlassian.config.ApplicationConfig applicationConfig,
ClusterManager clusterManager,
SharedDataManager clusterSharedDataManager,
LicenseService licenseService,
ClusterTouchFile clusterTouchFile)
|
Method Summary | |
---|---|
void |
bootstrapCluster()
Checks whether clustering is enabled, and bootstraps the cluster manager with an appropriate configuration |
void |
createCluster(String clusterName,
File clusterHome)
Deprecated. |
void |
createCluster(String clusterName,
File clusterHome,
InetAddress clusterAddress)
Creates a new cluster with the given name as long as the given cluster does not exist. |
void |
createCluster(String clusterName,
File clusterHome,
InetAddress clusterAddress,
String networkInterfaceName)
Creates a new cluster with the given name, on the specified network interface, as long as the given cluster does not exist. |
void |
createCluster(String clusterName,
File clusterHome,
String networkInterfaceName)
Deprecated. |
List<NetworkInterface> |
getClusterableInterfaces()
Return a list of interfaces suitable for clustered communication. |
int |
getPermittedClusterNodes()
|
com.atlassian.fugue.Option<File> |
getSharedHome()
Return the shared home directory if one has been configured. |
boolean |
isClusteredInstance()
|
boolean |
isLicensedClusterNodesExceeded()
|
void |
joinCluster(String clusterName,
File clusterHome)
Deprecated. |
void |
joinCluster(String clusterName,
File clusterHome,
InetAddress clusterAddress)
Join the named cluster, as long as it exists and the licensed member count is not exceeded. |
void |
joinCluster(String clusterName,
File clusterHome,
InetAddress clusterAddress,
String networkInterfaceName)
Join the named cluster, on the specified network interface, as long as it exists and the licensed member count is not exceeded. |
void |
joinCluster(String clusterName,
File clusterHome,
String networkInterfaceName)
Deprecated. |
void |
publishConfiguration()
Publish the configuration of this instance to the shared cluster cache, where it can be loaded by subsequent nodes during setup. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CLUSTER
public static final String CLUSTER_NAME
public static final String CLUSTER_ADDRESS
public static final String CLUSTER_INTERFACE
public static final String CLUSTER_TTL
public static final String CLUSTER_HOME
public static final String CLUSTER_TOUCH_TIME
Constructor Detail |
---|
public DefaultClusterConfigurationHelper(com.atlassian.config.ApplicationConfig applicationConfig, ClusterManager clusterManager, SharedDataManager clusterSharedDataManager, LicenseService licenseService, ClusterTouchFile clusterTouchFile)
Method Detail |
---|
public boolean isClusteredInstance()
isClusteredInstance
in interface ClusterConfigurationHelper
public boolean isLicensedClusterNodesExceeded()
isLicensedClusterNodesExceeded
in interface ClusterConfigurationHelper
@Deprecated public void joinCluster(String clusterName, File clusterHome) throws ClusterException
ClusterConfigurationHelper
joinCluster
in interface ClusterConfigurationHelper
ClusterException
- if an error joining the cluster.public void joinCluster(String clusterName, File clusterHome, InetAddress clusterAddress) throws ClusterException
ClusterConfigurationHelper
joinCluster
in interface ClusterConfigurationHelper
ClusterException
- if an error joining the cluster.@Deprecated public void joinCluster(String clusterName, File clusterHome, String networkInterfaceName) throws ClusterException
ClusterConfigurationHelper
joinCluster
in interface ClusterConfigurationHelper
ClusterException
- if an error joining the cluster.public void joinCluster(String clusterName, File clusterHome, InetAddress clusterAddress, @Nullable String networkInterfaceName) throws ClusterException
ClusterConfigurationHelper
joinCluster
in interface ClusterConfigurationHelper
ClusterException
- if an error joining the cluster.@Deprecated public void createCluster(String clusterName, File clusterHome) throws ClusterException
ClusterConfigurationHelper
createCluster
in interface ClusterConfigurationHelper
ClusterException
- if an error setting up the cluster.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, String networkInterfaceName) throws ClusterException
ClusterConfigurationHelper
createCluster
in interface ClusterConfigurationHelper
ClusterException
- if an error setting up the cluster.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 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.public int getPermittedClusterNodes()
getPermittedClusterNodes
in interface ClusterConfigurationHelper
Integer.MAX_VALUE
, otherwise
returns 0.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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |