Search in sources :

Example 1 with DownOrStartingRule

use of com.netflix.eureka.registry.rule.DownOrStartingRule in project eureka by Netflix.

the class AwsInstanceRegistry method init.

@Override
public void init(PeerEurekaNodes peerEurekaNodes) throws Exception {
    super.init(peerEurekaNodes);
    this.awsAsgUtil = new AwsAsgUtil(serverConfig, clientConfig, this);
    // We first check if the instance is STARTING or DOWN, then we check explicit overrides,
    // then we see if our ASG is UP, then we check the status of a potentially existing lease.
    this.instanceStatusOverrideRule = new FirstMatchWinsCompositeRule(new DownOrStartingRule(), new OverrideExistsRule(overriddenInstanceStatusMap), new AsgEnabledRule(this.awsAsgUtil), new LeaseExistsRule());
}
Also used : AsgEnabledRule(com.netflix.eureka.registry.rule.AsgEnabledRule) LeaseExistsRule(com.netflix.eureka.registry.rule.LeaseExistsRule) AwsAsgUtil(com.netflix.eureka.aws.AwsAsgUtil) FirstMatchWinsCompositeRule(com.netflix.eureka.registry.rule.FirstMatchWinsCompositeRule) OverrideExistsRule(com.netflix.eureka.registry.rule.OverrideExistsRule) DownOrStartingRule(com.netflix.eureka.registry.rule.DownOrStartingRule)

Aggregations

AwsAsgUtil (com.netflix.eureka.aws.AwsAsgUtil)1 AsgEnabledRule (com.netflix.eureka.registry.rule.AsgEnabledRule)1 DownOrStartingRule (com.netflix.eureka.registry.rule.DownOrStartingRule)1 FirstMatchWinsCompositeRule (com.netflix.eureka.registry.rule.FirstMatchWinsCompositeRule)1 LeaseExistsRule (com.netflix.eureka.registry.rule.LeaseExistsRule)1 OverrideExistsRule (com.netflix.eureka.registry.rule.OverrideExistsRule)1