Class Zone


  • public class Zone
    extends java.lang.Object
    The zone (environment + region) of this runtime, and some other information. An injected instance of this will return the correct current environment and region. Components can use this to obtain information about which zone they are running in.
    Author:
    bratseth
    • Constructor Detail

      • Zone

        @Inject
        public Zone​(com.yahoo.cloud.config.ConfigserverConfig configserverConfig,
                    CloudConfig cloudConfig)
      • Zone

        public Zone​(Environment environment,
                    RegionName region)
        Create from environment and region. Use for testing.
      • Zone

        public Zone​(Cloud cloud,
                    SystemName systemName,
                    Environment environment,
                    RegionName region)
        Create from cloud, system, environment and region. Also used for testing.
    • Method Detail

      • getCloud

        public Cloud getCloud()
        Returns the current cloud
      • system

        public SystemName system()
        Returns the current system
      • environment

        public Environment environment()
        Returns the current environment
      • region

        public RegionName region()
        Returns the current region
      • defaultZone

        public static Zone defaultZone()
        Do not use
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object