|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.lease.AbstractLeaseMap
com.sun.jini.landlord.LandlordLeaseMap
public class LandlordLeaseMap
Implementation of LeaseMap
for LandlordLease
.
LandlordLease
,
LeaseMap
Field Summary | |
---|---|
private Landlord |
landlord
The landlord which this map will talk to. |
private Uuid |
landlordUuid
The Uuid of the landlord . |
Fields inherited from class com.sun.jini.lease.AbstractLeaseMap |
---|
map |
Constructor Summary | |
---|---|
LandlordLeaseMap(Landlord landlord,
Uuid landlordUuid,
Lease lease,
long duration)
Create a new LandlordLeaseMap . |
Method Summary | |
---|---|
void |
cancelAll()
Cancels all leases in the LeaseMap. |
boolean |
canContainKey(Object key)
Returns true if the given object is a Lease which can be renewed and cancelled in a batch with other leases in the map. |
(package private) Landlord |
landlord()
Return the landlord. |
void |
renewAll()
Renews all leases in the LeaseMap, using their current values as the renewal durations. |
Methods inherited from class com.sun.jini.lease.AbstractLeaseMap |
---|
checkKey, checkValue, clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Landlord landlord
private final Uuid landlordUuid
Uuid
of the landlord
. Used
to determine if a lease can be placed in this map.
Constructor Detail |
---|
LandlordLeaseMap(Landlord landlord, Uuid landlordUuid, Lease lease, long duration)
LandlordLeaseMap
.
landlord
- Owner of the resource lease
is for.landlordUuid
- a universally unique id that has been
assigned to the server granting of the lease.
Ideally the Uuid
landlord.getUuid
would
return if landlord
implemented
ReferentUuid
. Used to determine when
two leases can be batched together.lease
- first lease to be placed in the map. It is
assumed that canContainKey(lease)
would be true
. Must work with the
landlord protocol.duration
- the duration the lease should be renewed for if
renewAll
is called
NullPointerException
- if landlord
or
landlordUuid
is null
.Method Detail |
---|
public boolean canContainKey(Object key)
LeaseMap
key
- an object that should be a lease
Lease.canBatch(net.jini.core.lease.Lease)
public void cancelAll() throws LeaseMapException, RemoteException
LeaseMap
LeaseMapException
RemoteException
public void renewAll() throws LeaseMapException, RemoteException
LeaseMap
LeaseMapException
RemoteException
Landlord landlord()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |