Enum 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 experiment
      perf
      Environment used to run performance and stability experiments
      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
    • 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 manually
      boolean isMultiRegion()
      Returns whether this environment can exist in multiple regions
      boolean isProduction()
      Returns whether this environment is production (prod)
      boolean isTest()
      Returns whether this environment is for automated tests
      java.lang.String value()
      Returns a name of this which is used in external API's and stored in persistent stores
      static 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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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 name
        java.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