java.lang.Object
io.micronaut.kubernetes.client.openapi.model.V1LeaseSpec

@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen") public class V1LeaseSpec extends Object
LeaseSpec is a specification of a Lease.
  • Field Details

  • Constructor Details

    • V1LeaseSpec

      public V1LeaseSpec()
  • Method Details

    • getAcquireTime

      public ZonedDateTime getAcquireTime()
      acquireTime is a time when the current lease was acquired.
      Returns:
      the acquireTime property value
    • setAcquireTime

      public void setAcquireTime(ZonedDateTime acquireTime)
      Set the acquireTime property value
      Parameters:
      acquireTime - property value to set
    • acquireTime

      public V1LeaseSpec acquireTime(ZonedDateTime acquireTime)
      Set acquireTime in a chainable fashion.
      Returns:
      The same instance of V1LeaseSpec for chaining.
    • getHolderIdentity

      public String getHolderIdentity()
      holderIdentity contains the identity of the holder of a current lease. If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.
      Returns:
      the holderIdentity property value
    • setHolderIdentity

      public void setHolderIdentity(String holderIdentity)
      Set the holderIdentity property value
      Parameters:
      holderIdentity - property value to set
    • holderIdentity

      public V1LeaseSpec holderIdentity(String holderIdentity)
      Set holderIdentity in a chainable fashion.
      Returns:
      The same instance of V1LeaseSpec for chaining.
    • getLeaseDurationSeconds

      public Integer getLeaseDurationSeconds()
      leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measured against the time of last observed renewTime.
      Returns:
      the leaseDurationSeconds property value
    • setLeaseDurationSeconds

      public void setLeaseDurationSeconds(Integer leaseDurationSeconds)
      Set the leaseDurationSeconds property value
      Parameters:
      leaseDurationSeconds - property value to set
    • leaseDurationSeconds

      public V1LeaseSpec leaseDurationSeconds(Integer leaseDurationSeconds)
      Set leaseDurationSeconds in a chainable fashion.
      Returns:
      The same instance of V1LeaseSpec for chaining.
    • getLeaseTransitions

      public Integer getLeaseTransitions()
      leaseTransitions is the number of transitions of a lease between holders.
      Returns:
      the leaseTransitions property value
    • setLeaseTransitions

      public void setLeaseTransitions(Integer leaseTransitions)
      Set the leaseTransitions property value
      Parameters:
      leaseTransitions - property value to set
    • leaseTransitions

      public V1LeaseSpec leaseTransitions(Integer leaseTransitions)
      Set leaseTransitions in a chainable fashion.
      Returns:
      The same instance of V1LeaseSpec for chaining.
    • getPreferredHolder

      public String getPreferredHolder()
      PreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up. This field can only be set if Strategy is also set.
      Returns:
      the preferredHolder property value
    • setPreferredHolder

      public void setPreferredHolder(String preferredHolder)
      Set the preferredHolder property value
      Parameters:
      preferredHolder - property value to set
    • preferredHolder

      public V1LeaseSpec preferredHolder(String preferredHolder)
      Set preferredHolder in a chainable fashion.
      Returns:
      The same instance of V1LeaseSpec for chaining.
    • getRenewTime

      public ZonedDateTime getRenewTime()
      renewTime is a time when the current holder of a lease has last updated the lease.
      Returns:
      the renewTime property value
    • setRenewTime

      public void setRenewTime(ZonedDateTime renewTime)
      Set the renewTime property value
      Parameters:
      renewTime - property value to set
    • renewTime

      public V1LeaseSpec renewTime(ZonedDateTime renewTime)
      Set renewTime in a chainable fashion.
      Returns:
      The same instance of V1LeaseSpec for chaining.
    • getStrategy

      public String getStrategy()
      Strategy indicates the strategy for picking the leader for coordinated leader election. If the field is not specified, there is no active coordination for this lease. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.
      Returns:
      the strategy property value
    • setStrategy

      public void setStrategy(String strategy)
      Set the strategy property value
      Parameters:
      strategy - property value to set
    • strategy

      public V1LeaseSpec strategy(String strategy)
      Set strategy in a chainable fashion.
      Returns:
      The same instance of V1LeaseSpec for chaining.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object