|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jini.lease.AbstractLease
public abstract class AbstractLease
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.
| Field Summary | |
|---|---|
protected long |
expiration
The lease expiration, in local absolute time. |
protected int |
serialFormat
Serialization format for the expiration. |
| Fields inherited from interface net.jini.core.lease.Lease |
|---|
ABSOLUTE, ANY, DURATION, FOREVER |
| Constructor Summary | |
|---|---|
protected |
AbstractLease(long expiration)
Construct a relative-format lease. |
| Method Summary | |
|---|---|
protected abstract long |
doRenew(long duration)
Renew the lease for a duration relative to now, and return the duration actually granted. |
long |
getExpiration()
Return the lease expiration. |
int |
getSerialFormat()
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 Detail |
|---|
protected transient long expiration
protected int serialFormat
| Constructor Detail |
|---|
protected AbstractLease(long expiration)
| Method Detail |
|---|
public long getExpiration()
getExpiration in interface Leaselong that indicates the time that the
lease will expirepublic int getSerialFormat()
getSerialFormat in interface LeaseLease.setSerialFormat(int)public void setSerialFormat(int format)
setSerialFormat in interface Leaseformat - DURATION or ABSOLUTELease.getSerialFormat()
public void renew(long duration)
throws UnknownLeaseException,
LeaseDeniedException,
RemoteException
renew in interface Leaseduration - the requested duration in milliseconds
UnknownLeaseException - the lease being renewed is unknown
to the lease grantor
LeaseDeniedException - the lease grantor is unable or
unwilling to renew the lease
RemoteException
protected abstract long doRenew(long duration)
throws UnknownLeaseException,
LeaseDeniedException,
RemoteException
UnknownLeaseException
LeaseDeniedException
RemoteException
|
GigaSpaces XAP 10.1 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||