Class LeaseRequestState


  • class LeaseRequestState
    extends Object
    Bundle up the data points necessary when asynchronously requesting a lease from a client
    • Constructor Detail

      • LeaseRequestState

        public LeaseRequestState​(Job onGranted,
                                 Job onFailed,
                                 long currentEarliestLeastDate,
                                 long expiration,
                                 LeaseSet requested)
        Parameters:
        currentEarliestLeastDate - absolute time, the earliest expiration in the current LS (NOT the requested one), or 0 if none
        expiration - absolute time, when the request expires (not when the LS expires)
        requested - LeaseSet with requested leases - this object must be updated to contain the signed version (as well as any changed/added/removed Leases) The LeaseSet contains Leases and destination only, it is unsigned.
    • Method Detail

      • getGranted

        public LeaseSet getGranted()
        created lease set from client - FIXME always null
      • setGranted

        public void setGranted​(LeaseSet ls)
        FIXME unused - why?
      • getRequested

        public LeaseSet getRequested()
        lease set that is being requested
      • getOnGranted

        public Job getOnGranted()
        what to do once the lease set is created
      • getOnFailed

        public Job getOnFailed()
        what to do if the lease set create fails / times out
      • getExpiration

        public long getExpiration()
        when the request for the lease set expires
      • getCurrentEarliestLeaseDate

        public long getCurrentEarliestLeaseDate()
        The earliest lease expiration time in the current LS (NOT the requested one), or 0 if none.
        Since:
        0.9.39
      • getIsSuccessful

        public boolean getIsSuccessful()
        whether the request was successful in the time allotted
      • setIsSuccessful

        public void setIsSuccessful​(boolean is)