Class LeaseSpec.Builder

  • All Implemented Interfaces:
    software.amazon.jsii.Builder<LeaseSpec>
    Enclosing interface:
    LeaseSpec

    @Stability(Stable)
    public static final class LeaseSpec.Builder
    extends Object
    implements software.amazon.jsii.Builder<LeaseSpec>
    A builder for LeaseSpec
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • holderIdentity

        @Stability(Stable)
        public LeaseSpec.Builder holderIdentity​(String holderIdentity)
        Parameters:
        holderIdentity - holderIdentity contains the identity of the holder of a current lease.
        Returns:
        this
      • leaseDurationSeconds

        @Stability(Stable)
        public LeaseSpec.Builder leaseDurationSeconds​(Number leaseDurationSeconds)
        Parameters:
        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.
        Returns:
        this
      • leaseTransitions

        @Stability(Stable)
        public LeaseSpec.Builder leaseTransitions​(Number leaseTransitions)
        Parameters:
        leaseTransitions - leaseTransitions is the number of transitions of a lease between holders.
        Returns:
        this
      • renewTime

        @Stability(Stable)
        public LeaseSpec.Builder renewTime​(Instant renewTime)
        Sets the value of LeaseSpec.getRenewTime()
        Parameters:
        renewTime - renewTime is a time when the current holder of a lease has last updated the lease.
        Returns:
        this
      • build

        @Stability(Stable)
        public LeaseSpec build()
        Builds the configured instance.
        Specified by:
        build in interface software.amazon.jsii.Builder<LeaseSpec>
        Returns:
        a new instance of LeaseSpec
        Throws:
        NullPointerException - if any required attribute was not provided