Enum Class Environment

java.lang.Object
java.lang.Enum<Environment>
com.yahoo.config.provision.Environment
All Implemented Interfaces:
Serializable, Comparable<Environment>, Constable

public enum Environment extends Enum<Environment>
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 Constants
    Enum Constant
    Description
    Environment used by individual developers to experiment
    Environment used to run performance and stability experiments
    The environment in which any external or internal applications serve actual requests
    Production-like environment which runs staging tests before an app is deployed to production
    Environment for running system tests before an app is deployed to staging
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the prod environment.
    from(String value)
    Returns the environment name from the string value returned by value()
    boolean
    isAnyOf(Environment... environments)
    Returns whether this is one of the given environments
    boolean
    Returns whether deployments to this environment are done manually
    boolean
    Returns whether this environment can exist in multiple regions
    boolean
    Returns whether this environment is production (prod)
    boolean
    Returns whether this environment is for automated tests
    Returns a name of this which is used in external API's and stored in persistent stores
    Returns the enum constant of this class with the specified name.
    static Environment[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • 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 Details

    • values

      public static Environment[] 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

      public static Environment valueOf(String name)
      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 name
      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
    • isAnyOf

      public boolean isAnyOf(Environment... environments)
      Returns whether this is one of the given environments
    • from

      public static Environment from(String value)
      Returns the environment name from the string value returned by value()
    • value

      public String value()
      Returns a name of this which is used in external API's and stored in persistent stores