Enum Environment

    • 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​(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:
        IllegalArgumentException - if this enum type 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