java.rmi.dgc

Class Lease

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.
Constructor Summary
Lease(VMID id, long duration)
Create the new lease with the given id and duration
Method Summary
longgetValue()
Get the lease duration
VMIDgetVMID()
Get the lease id.
StringtoString()
Get the string representation of this lease

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

getValue

public long getValue()
Get the lease duration

Returns: the lease duration

getVMID

public VMID getVMID()
Get the lease id.

Returns: the lease id

toString

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

Returns: the string represenation (lease id, followed by the lease duration).