Class LeaseExistsRule

  • All Implemented Interfaces:
    InstanceStatusOverrideRule

    public class LeaseExistsRule
    extends java.lang.Object
    implements InstanceStatusOverrideRule
    This rule matches if we have an existing lease for the instance that is UP or OUT_OF_SERVICE. Created by Nikos Michalakis on 7/13/16.
    • Constructor Summary

      Constructors 
      Constructor Description
      LeaseExistsRule()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      StatusOverrideResult apply​(com.netflix.appinfo.InstanceInfo instanceInfo, Lease<com.netflix.appinfo.InstanceInfo> existingLease, boolean isReplication)
      Match this rule.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LeaseExistsRule

        public LeaseExistsRule()
    • Method Detail

      • apply

        public StatusOverrideResult apply​(com.netflix.appinfo.InstanceInfo instanceInfo,
                                          Lease<com.netflix.appinfo.InstanceInfo> existingLease,
                                          boolean isReplication)
        Description copied from interface: InstanceStatusOverrideRule
        Match this rule.
        Specified by:
        apply in interface InstanceStatusOverrideRule
        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:
        toString in class java.lang.Object