Package com.yahoo.config.provision
Enum Environment
- java.lang.Object
-
- java.lang.Enum<Environment>
-
- com.yahoo.config.provision.Environment
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Environment>
public enum Environment extends java.lang.Enum<Environment>
Environments in hosted Vespa.- Author:
- bratseth
-
-
Enum Constant Summary
Enum Constants Enum Constant Description dev
Environment used by individual developers to experimentperf
Environment used to run performance and stability experimentsprod
The environment in which any external or internal applications serve actual requestsstaging
Production-like environment which runs staging tests before an app is deployed to productiontest
Environment for running system tests before an app is deployed to staging
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Environment
defaultEnvironment()
Returns the prod environment.static Environment
from(java.lang.String value)
Returns the environment name from the string value returned by value()boolean
isManuallyDeployed()
Returns whether deployments to this environment are done manuallyboolean
isMultiRegion()
Returns whether this environment can exist in multiple regionsboolean
isProduction()
Returns whether this environment is production (prod)boolean
isTest()
Returns whether this environment is for automated testsjava.lang.String
value()
Returns a name of this which is used in external API's and stored in persistent storesstatic Environment
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Environment[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
prod
public static final Environment prod
The environment in which any external or internal applications serve actual requests
-
staging
public static final Environment staging
Production-like environment which runs staging tests before an app is deployed to production
-
test
public static final Environment test
Environment for running system tests before an app is deployed to staging
-
dev
public static final Environment dev
Environment used by individual developers to experiment
-
perf
public static final Environment perf
Environment used to run performance and stability experiments
-
-
Method Detail
-
values
public static Environment[] 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 (Environment c : Environment.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Environment valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- 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)
-
isMultiRegion
public boolean isMultiRegion()
Returns whether this environment can exist in multiple regions
-
defaultEnvironment
public static Environment defaultEnvironment()
Returns the prod environment. This is useful for non-hosted properties where we just need any consistent value
-
from
public static Environment from(java.lang.String value)
Returns the environment name from the string value returned by value()
-
value
public java.lang.String value()
Returns a name of this which is used in external API's and stored in persistent stores
-
-