Class ClusterConfigurationUtils

java.lang.Object
com.atlassian.confluence.cluster.ClusterConfigurationUtils

@Internal public final class ClusterConfigurationUtils extends Object
Helper class for retrieving cluster configuration information. It is designed for internal use only.
Since:
6.11
  • 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
    • getSharedHome

      public 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.
    • getAwsEc2PrivateIp

      public static String getAwsEc2PrivateIp(@NonNull String defaultIp)
      Returns:
      string representing local Ipv4 address of the AWS EC2 instance or predefined defaultIp if call for instance metadata fails
      Since:
      7.20
    • getKubernetesPodIp

      public static String getKubernetesPodIp(@NonNull String defaultIp)
      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