Class AbstractLease

java.lang.Object
com.sun.jini.lease.AbstractLease
All Implemented Interfaces:
Serializable, Lease
Direct Known Subclasses:
EventLease, LandlordLease

public abstract class AbstractLease extends Object implements Lease, Serializable
A base class for implementing lease objects. This class takes care of absolute vs relative time issues and implements some of the Lease methods. The subclass is responsible for implementing: doRenew, cancel, createLeaseMap, canBatch, hashCode, equals, and serialization of any subclass state.
Author:
Sun Microsystems, Inc.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected long
    The lease expiration, in local absolute time.
    protected int
    Serialization format for the expiration.

    Fields inherited from interface net.jini.core.lease.Lease

    ABSOLUTE, ANY, DURATION, FOREVER
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractLease(long expiration)
    Construct a relative-format lease.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract long
    doRenew(long duration)
    Renew the lease for a duration relative to now, and return the duration actually granted.
    long
    Return the lease expiration.
    int
    Return the serialization format for the expiration.
    void
    renew(long duration)
    Renew the lease for a duration relative to now.
    void
    setSerialFormat(int format)
    Set the serialization format for the expiration.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.jini.core.lease.Lease

    canBatch, cancel, createLeaseMap
  • Field Details

    • expiration

      protected transient long expiration
      The lease expiration, in local absolute time.
    • serialFormat

      protected int serialFormat
      Serialization format for the expiration.
  • Constructor Details

    • AbstractLease

      protected AbstractLease(long expiration)
      Construct a relative-format lease.
  • Method Details