Class LeaseSpec

  • All Implemented Interfaces:
    com.marcnuri.yakc.model.Model

    public class LeaseSpec
    extends java.lang.Object
    implements com.marcnuri.yakc.model.Model
    LeaseSpec is a specification of a Lease.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  LeaseSpec.Builder  
    • Constructor Summary

      Constructors 
      Constructor Description
      LeaseSpec()  
      LeaseSpec​(java.time.OffsetDateTime acquireTime, java.lang.String holderIdentity, java.lang.Number leaseDurationSeconds, java.lang.Number leaseTransitions, java.time.OffsetDateTime renewTime)  
    • Constructor Detail

      • LeaseSpec

        public LeaseSpec​(java.time.OffsetDateTime acquireTime,
                         java.lang.String holderIdentity,
                         java.lang.Number leaseDurationSeconds,
                         java.lang.Number leaseTransitions,
                         java.time.OffsetDateTime renewTime)
      • LeaseSpec

        public LeaseSpec()
    • Method Detail

      • getAcquireTime

        public java.time.OffsetDateTime getAcquireTime()
      • getHolderIdentity

        public java.lang.String getHolderIdentity()
        holderIdentity contains the identity of the holder of a current lease.
      • getLeaseDurationSeconds

        public java.lang.Number getLeaseDurationSeconds()
        leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.
      • getLeaseTransitions

        public java.lang.Number getLeaseTransitions()
        leaseTransitions is the number of transitions of a lease between holders.
      • getRenewTime

        public java.time.OffsetDateTime getRenewTime()
      • setAcquireTime

        public void setAcquireTime​(java.time.OffsetDateTime acquireTime)
      • setHolderIdentity

        public void setHolderIdentity​(java.lang.String holderIdentity)
        holderIdentity contains the identity of the holder of a current lease.
      • setLeaseDurationSeconds

        public void setLeaseDurationSeconds​(java.lang.Number leaseDurationSeconds)
        leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. This is measure against time of last observed RenewTime.
      • setLeaseTransitions

        public void setLeaseTransitions​(java.lang.Number leaseTransitions)
        leaseTransitions is the number of transitions of a lease between holders.
      • setRenewTime

        public void setRenewTime​(java.time.OffsetDateTime renewTime)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object