Enum Alloy

    • Method Detail

      • values

        public static Alloy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Alloy c : Alloy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Alloy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • doesAlloyConfigExist

        public static boolean doesAlloyConfigExist()
        Checks if Alloy configuration exists either in the default file or as env variable.
      • doesAlloyFileExists

        public static boolean doesAlloyFileExists()
        Checks if Alloy file exists.
      • doesAlloyEnvExists

        public static boolean doesAlloyEnvExists()
        Checks if Alloy config exists as env variable.
      • isAlloyRegionCoexistEnabled

        public static boolean isAlloyRegionCoexistEnabled()
        Checks if Oci Alloy region coexist is set to true.
      • shouldUseOnlyAlloyRegions

        public static boolean shouldUseOnlyAlloyRegions()
        Checks if regions from only the Alloy config has to be considered.
      • getAlloyEnvContent

        public static String getAlloyEnvContent()
        Get config path from env variable.
      • getAlloyConfigFilePath

        public static String getAlloyConfigFilePath()
        Get config path from env variable or from the default file path.
      • throwUnknownAlloyRegionIfAppropriate

        public static void throwUnknownAlloyRegionIfAppropriate​(String regionId,
                                                                Throwable e)
        Throws IllegalArgumentException if the region ID is not a registered Alloy region.
        Parameters:
        regionId - The region ID
        e - The error received.
      • throwDisabledServiceExceptionIfAppropriate

        public static void throwDisabledServiceExceptionIfAppropriate​(String serviceName)
        Throws IllegalArgumentException if the service is not a registered Alloy service.
        Parameters:
        serviceName - Name of the service
      • resetAlloyRegionCoexistStatus

        public static void resetAlloyRegionCoexistStatus()