Package com.yahoo.config.provision
Enum Class Environment
- All Implemented Interfaces:
Serializable,Comparable<Environment>,Constable
Environments in hosted Vespa.
- Author:
- bratseth
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEnvironment used by individual developers to experimentEnvironment used to run performance and stability experimentsThe environment in which any external or internal applications serve actual requestsProduction-like environment which runs staging tests before an app is deployed to productionEnvironment for running system tests before an app is deployed to staging -
Method Summary
Modifier and TypeMethodDescriptionstatic EnvironmentReturns the prod environment.static EnvironmentReturns the environment name from the string value returned by value()booleanisAnyOf(Environment... environments) Returns whether this is one of the given environmentsbooleanReturns whether deployments to this environment are done manuallybooleanReturns whether this environment is production (prod)booleanisTest()Returns whether this environment is for automated testsvalue()Returns a name of this which is used in external API's and stored in persistent storesstatic EnvironmentReturns the enum constant of this class with the specified name.static Environment[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
prod
The environment in which any external or internal applications serve actual requests -
staging
Production-like environment which runs staging tests before an app is deployed to production -
test
Environment for running system tests before an app is deployed to staging -
dev
Environment used by individual developers to experiment -
perf
Environment used to run performance and stability experiments
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
isManuallyDeployed
public boolean isManuallyDeployed()Returns whether deployments to this environment are done manually -
isTest
public boolean isTest()Returns whether this environment is for automated tests -
isProduction
public boolean isProduction()Returns whether this environment is production (prod) -
defaultEnvironment
Returns the prod environment. This is useful for non-hosted properties where we just need any consistent value -
isAnyOf
Returns whether this is one of the given environments -
from
Returns the environment name from the string value returned by value() -
value
Returns a name of this which is used in external API's and stored in persistent stores
-