Class 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 Detail

      • 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