Package com.atlassian.confluence.cluster
Class ClusterConfigurationUtils
java.lang.Object
com.atlassian.confluence.cluster.ClusterConfigurationUtils
Helper class for retrieving cluster configuration information. It is designed for internal use only.
- Since:
- 6.11
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getAwsEc2PrivateIp
(@NonNull String defaultIp) static ClusterConfig
getClusterConfig
(com.atlassian.config.ApplicationConfiguration applicationConfig) static String
getKubernetesPodIp
(@NonNull String defaultIp) static @NonNull File
getSharedHome
(com.atlassian.config.ApplicationConfiguration applicationConfig) Returns the cluster shared home directory, if one is configured, else returns a subdirectory of the local home.static boolean
isClusterHomeConfigured
(com.atlassian.config.ApplicationConfiguration applicationConfig)
-
Method Details
-
getClusterConfig
public static ClusterConfig getClusterConfig(com.atlassian.config.ApplicationConfiguration applicationConfig) throws ClusterException - Returns:
- the current cluster configuration
- Throws:
ClusterException
- if the current configuration is invalid
-
isClusterHomeConfigured
public static boolean isClusterHomeConfigured(com.atlassian.config.ApplicationConfiguration applicationConfig) - Returns:
- true if the given
ApplicationConfiguration
has the cluster shared home directory configured - Since:
- 7.19
-
getAwsEc2PrivateIp
- Returns:
- string representing local Ipv4 address of the AWS EC2 instance or predefined defaultIp if call for instance metadata fails
- Since:
- 7.20
-
getKubernetesPodIp
- Returns:
- string representing local Ipv4 address of the Kubernetes pod or predefined defaultIp if POD_IP environment variable was not defined. POD_IP environment variable is set by the Helm Chart using downward API.
- Since:
- 9.1
-