Package com.yahoo.config.application.api
Class DeploymentInstanceSpec
- java.lang.Object
-
- com.yahoo.config.application.api.DeploymentSpec.Step
-
- com.yahoo.config.application.api.DeploymentInstanceSpec
-
public class DeploymentInstanceSpec extends DeploymentSpec.Step
The deployment spec for an application instance- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description DeploymentInstanceSpec(com.yahoo.config.provision.InstanceName name, java.util.List<DeploymentSpec.Step> steps, DeploymentSpec.UpgradePolicy upgradePolicy, java.util.List<DeploymentSpec.ChangeBlocker> changeBlockers, java.util.Optional<java.lang.String> globalServiceId, java.util.Optional<com.yahoo.config.provision.AthenzDomain> athenzDomain, java.util.Optional<com.yahoo.config.provision.AthenzService> athenzService, Notifications notifications, java.util.List<Endpoint> endpoints)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<com.yahoo.config.provision.AthenzDomain>
athenzDomain()
Returns the athenz domain if configuredjava.util.Optional<com.yahoo.config.provision.AthenzService>
athenzService(com.yahoo.config.provision.Environment environment, com.yahoo.config.provision.RegionName region)
Returns the athenz service for environment/region if configuredboolean
canChangeRevisionAt(java.time.Instant instant)
Returns whether an application revision change for these instances can occur at the given instantboolean
canUpgradeAt(java.time.Instant instant)
Returns whether the instances in this step can upgrade at the given instantjava.util.List<DeploymentSpec.ChangeBlocker>
changeBlocker()
Returns time windows where upgrades are disallowed for these instancesjava.time.Duration
delay()
The delay introduced by this step (beyond the time it takes to execute the step).boolean
deploysTo(com.yahoo.config.provision.Environment environment, java.util.Optional<com.yahoo.config.provision.RegionName> region)
Returns whether this deployment spec specifies the given zone, either implicitly or explicitlyjava.util.List<Endpoint>
endpoints()
Returns the rotations configuration of these instancesboolean
equals(java.lang.Object o)
java.util.Optional<java.lang.String>
globalServiceId()
Returns the ID of the service to expose through global routing, if presentint
hashCode()
boolean
includes(com.yahoo.config.provision.Environment environment, java.util.Optional<com.yahoo.config.provision.RegionName> region)
Returns whether this instances deployment specifies the given zone, either implicitly or explicitlycom.yahoo.config.provision.InstanceName
name()
Notifications
notifications()
Returns the notification configuration of these instancesjava.util.List<DeploymentSpec.Step>
steps()
Returns the deployment steps inside this in the order they will be performedjava.lang.String
toString()
DeploymentSpec.UpgradePolicy
upgradePolicy()
Returns the upgrade policy of this, which is defaultPolicy if none is specifiedjava.util.List<DeploymentSpec.DeclaredZone>
zones()
Returns all the deployment steps which are zones in the order they are declared-
Methods inherited from class com.yahoo.config.application.api.DeploymentSpec.Step
deploysTo
-
-
-
-
Constructor Detail
-
DeploymentInstanceSpec
public DeploymentInstanceSpec(com.yahoo.config.provision.InstanceName name, java.util.List<DeploymentSpec.Step> steps, DeploymentSpec.UpgradePolicy upgradePolicy, java.util.List<DeploymentSpec.ChangeBlocker> changeBlockers, java.util.Optional<java.lang.String> globalServiceId, java.util.Optional<com.yahoo.config.provision.AthenzDomain> athenzDomain, java.util.Optional<com.yahoo.config.provision.AthenzService> athenzService, Notifications notifications, java.util.List<Endpoint> endpoints)
-
-
Method Detail
-
name
public com.yahoo.config.provision.InstanceName name()
-
delay
public java.time.Duration delay()
Description copied from class:DeploymentSpec.Step
The delay introduced by this step (beyond the time it takes to execute the step). Default is zero.- Overrides:
delay
in classDeploymentSpec.Step
-
steps
public java.util.List<DeploymentSpec.Step> steps()
Returns the deployment steps inside this in the order they will be performed- Overrides:
steps
in classDeploymentSpec.Step
-
upgradePolicy
public DeploymentSpec.UpgradePolicy upgradePolicy()
Returns the upgrade policy of this, which is defaultPolicy if none is specified
-
changeBlocker
public java.util.List<DeploymentSpec.ChangeBlocker> changeBlocker()
Returns time windows where upgrades are disallowed for these instances
-
globalServiceId
public java.util.Optional<java.lang.String> globalServiceId()
Returns the ID of the service to expose through global routing, if present
-
canUpgradeAt
public boolean canUpgradeAt(java.time.Instant instant)
Returns whether the instances in this step can upgrade at the given instant
-
canChangeRevisionAt
public boolean canChangeRevisionAt(java.time.Instant instant)
Returns whether an application revision change for these instances can occur at the given instant
-
zones
public java.util.List<DeploymentSpec.DeclaredZone> zones()
Returns all the deployment steps which are zones in the order they are declared- Overrides:
zones
in classDeploymentSpec.Step
-
deploysTo
public boolean deploysTo(com.yahoo.config.provision.Environment environment, java.util.Optional<com.yahoo.config.provision.RegionName> region)
Returns whether this deployment spec specifies the given zone, either implicitly or explicitly- Specified by:
deploysTo
in classDeploymentSpec.Step
-
athenzDomain
public java.util.Optional<com.yahoo.config.provision.AthenzDomain> athenzDomain()
Returns the athenz domain if configured
-
athenzService
public java.util.Optional<com.yahoo.config.provision.AthenzService> athenzService(com.yahoo.config.provision.Environment environment, com.yahoo.config.provision.RegionName region)
Returns the athenz service for environment/region if configured
-
notifications
public Notifications notifications()
Returns the notification configuration of these instances
-
endpoints
public java.util.List<Endpoint> endpoints()
Returns the rotations configuration of these instances
-
includes
public boolean includes(com.yahoo.config.provision.Environment environment, java.util.Optional<com.yahoo.config.provision.RegionName> region)
Returns whether this instances deployment specifies the given zone, either implicitly or explicitly
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-