public final class ConstrainableLandlordLeaseMap extends LandlordLeaseMap
LandlordLeaseMap
.map
Constructor and Description |
---|
ConstrainableLandlordLeaseMap(Landlord landlord,
Uuid landlordUuid,
Lease lease,
long duration)
Create a new
ConstrainableLandlordLeaseMap . |
Modifier and Type | Method and Description |
---|---|
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.
|
cancelAll, landlord, renewAll
checkKey, checkValue, clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
ConstrainableLandlordLeaseMap(Landlord landlord, Uuid landlordUuid, Lease lease, long duration)
ConstrainableLandlordLeaseMap
.landlord
- Reference to the entity that created
lease
. Assumes that any
necessary method constraints have been
attached.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
leases can be added to this map.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.ClassCastException
- if landlord
does not implement RemoteMethodControl
.NullPointerException
- if landlord is null
.public boolean canContainKey(Object key)
LeaseMap
canContainKey
in interface LeaseMap
canContainKey
in class LandlordLeaseMap
key
- an object that should be a leaseLease.canBatch(net.jini.core.lease.Lease)
Copyright 2007-2016, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.