Package com.netflix.eureka.registry.rule
Class FirstMatchWinsCompositeRule
- java.lang.Object
-
- com.netflix.eureka.registry.rule.FirstMatchWinsCompositeRule
-
- All Implemented Interfaces:
InstanceStatusOverrideRule
public class FirstMatchWinsCompositeRule extends java.lang.Object implements InstanceStatusOverrideRule
This rule takes an ordered list of rules and returns the result of the first match or the result of theAlwaysMatchInstanceStatusRule. Created by Nikos Michalakis on 7/13/16.
-
-
Constructor Summary
Constructors Constructor Description FirstMatchWinsCompositeRule(InstanceStatusOverrideRule... rules)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatusOverrideResultapply(com.netflix.appinfo.InstanceInfo instanceInfo, Lease<com.netflix.appinfo.InstanceInfo> existingLease, boolean isReplication)Match this rule.java.lang.StringtoString()
-
-
-
Constructor Detail
-
FirstMatchWinsCompositeRule
public FirstMatchWinsCompositeRule(InstanceStatusOverrideRule... rules)
-
-
Method Detail
-
apply
public StatusOverrideResult apply(com.netflix.appinfo.InstanceInfo instanceInfo, Lease<com.netflix.appinfo.InstanceInfo> existingLease, boolean isReplication)
Description copied from interface:InstanceStatusOverrideRuleMatch this rule.- Specified by:
applyin interfaceInstanceStatusOverrideRule- Parameters:
instanceInfo- The instance info whose status we care about.existingLease- Does the instance have an existing lease already? If so let's consider that.isReplication- When overriding consider if we are under a replication mode from other servers.- Returns:
- A result with whether we matched and what we propose the status to be overriden to.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-