public enum Alloy extends Enum<Alloy>
Modifier and Type | Method and Description |
---|---|
static boolean |
doesAlloyConfigExist()
Checks if Alloy configuration exists either in the default file or as env variable.
|
static boolean |
doesAlloyEnvExists()
Checks if Alloy config exists as env variable.
|
static boolean |
doesAlloyFileExists()
Checks if Alloy file exists.
|
static String |
getAlloyConfigFilePath()
Get config path from env variable or from the default file path.
|
static String |
getAlloyEnvContent()
Get config path from env variable.
|
static boolean |
isAlloyRegionCoexistEnabled()
Checks if Oci Alloy region coexist is set to true.
|
static void |
resetAlloyRegionCoexistStatus() |
static boolean |
shouldUseOnlyAlloyRegions()
Checks if regions from only the Alloy config has to be considered.
|
static void |
throwDisabledServiceExceptionIfAppropriate(String serviceName)
Throws IllegalArgumentException if the service is not a registered Alloy service.
|
static void |
throwUnknownAlloyRegionIfAppropriate(String regionId,
Throwable e)
Throws IllegalArgumentException if the region ID is not a registered Alloy region.
|
static Alloy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Alloy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static Alloy[] values()
for (Alloy c : Alloy.values()) System.out.println(c);
public static Alloy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static boolean doesAlloyConfigExist()
Checks if Alloy configuration exists either in the default file or as env variable.
public static boolean doesAlloyFileExists()
Checks if Alloy file exists.
public static boolean doesAlloyEnvExists()
Checks if Alloy config exists as env variable.
public static boolean isAlloyRegionCoexistEnabled()
Checks if Oci Alloy region coexist is set to true.
public static boolean shouldUseOnlyAlloyRegions()
Checks if regions from only the Alloy config has to be considered.
public static String getAlloyEnvContent()
Get config path from env variable.
public static String getAlloyConfigFilePath()
Get config path from env variable or from the default file path.
public static void throwUnknownAlloyRegionIfAppropriate(String regionId, Throwable e)
Throws IllegalArgumentException if the region ID is not a registered Alloy region.
regionId
- The region IDe
- The error received.public static void throwDisabledServiceExceptionIfAppropriate(String serviceName)
Throws IllegalArgumentException if the service is not a registered Alloy service.
serviceName
- Name of the servicepublic static void resetAlloyRegionCoexistStatus()
Copyright © 2016–2024. All rights reserved.