java.rmi.dgc
Class Lease

java.lang.Object
  extended by java.rmi.dgc.Lease
All Implemented Interfaces:
Serializable

public final class Lease
extends Object
implements Serializable

A lease object is used to request and grant leases for the remote objects. It contains the lease duration and the unique VM indentifier.

See Also:
Serialized Form

Constructor Summary
Lease(VMID id, long duration)
          Create the new lease with the given id and duration
 
Method Summary
 long getValue()
          Get the lease duration
 VMID getVMID()
          Get the lease id.
 String toString()
          Get the string representation of this lease
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Lease

public Lease(VMID id,
             long duration)
Create the new lease with the given id and duration

Parameters:
id - the lease id
duration - the lease duration
Method Detail

getVMID

public VMID getVMID()
Get the lease id.

Returns:
the lease id

getValue

public long getValue()
Get the lease duration

Returns:
the lease duration

toString

public String toString()
Get the string representation of this lease

Overrides:
toString in class Object
Returns:
the string represenation (lease id, followed by the lease duration).
See Also:
Object.getClass(), Object.hashCode(), Class.getName(), Integer.toHexString(int)