|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.sun.jini.lease.LeaseRenewalManager
A lease renewal manager. The operations are appropriately synchronized for concurrent operation.
| Constructor Summary | |
LeaseRenewalManager()
Create a manager, initially managing no leases. |
|
LeaseRenewalManager(Lease lease,
long expiration,
LeaseListener listener)
Create a manager, initially managing a single lease. |
|
| Method Summary | |
void |
cancel(Lease lease)
Remove a lease from the managed set, and cancel it (only if it was in the managed set). |
void |
clear()
Remove all leases from the managed set. |
long |
getExpiration(Lease lease)
Return the current desired absolute expiration (which may be UNKNOWN) for the lease. |
void |
remove(Lease lease)
Remove a lease from the managed set. |
void |
renewFor(Lease lease,
long duration,
LeaseListener listener)
Add a lease to the managed set managed, renewed for a specific duration relative to now. |
void |
renewUntil(Lease lease,
long expiration,
LeaseListener listener)
Add a lease to the managed set, renewed until a specific absolute expiration. |
void |
setExpiration(Lease lease,
long expiration)
Change the desired absolute expiration for a lease that is already managed. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public LeaseRenewalManager()
public LeaseRenewalManager(Lease lease,
long expiration,
LeaseListener listener)
lease - the lease to renewexpiration - the desired absolute expiration of the lease,
with ANY allowedlistener - the event listener for this lease, or null| Method Detail |
public void renewFor(Lease lease,
long duration,
LeaseListener listener)
lease - the lease to renewduration - the desired duration of the lease. An absolute
expiration is computed by adding System.currentTimeMillis().listener - the event listener for this lease, or null
public void renewUntil(Lease lease,
long expiration,
LeaseListener listener)
lease - the lease to renewexpiration - the desired absolute expiration of the lease,
with ANY allowedlistener - the event listener for this lease, or null
public long getExpiration(Lease lease)
throws UnknownLeaseException
lease - the lease
public void setExpiration(Lease lease,
long expiration)
throws UnknownLeaseException
lease - the leaseexpiration - the new desired absolute expiration for the lease
public void cancel(Lease lease)
throws UnknownLeaseException,
java.rmi.RemoteException
lease - the lease
public void remove(Lease lease)
throws UnknownLeaseException
lease - the leasepublic void clear()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||