public final class ConstrainableLandlordLeaseMap extends LandlordLeaseMap
LandlordLeaseMap.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
ConstrainableLandlordLeaseMap(Landlord landlord,
Uuid landlordUuid,
LandlordLease 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.
|
private static Landlord |
chLandlord(Landlord landlord) |
cancelAll, checkLandlord, checkLandlordUuid, checkLease, landlord, renewAllcontainsKey, containsValue, entrySet, get, put, removeclear, clone, equals, hashCode, isEmpty, keySet, putAll, size, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitclear, compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, valuesConstrainableLandlordLeaseMap(Landlord landlord, Uuid landlordUuid, LandlordLease 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.private static Landlord chLandlord(Landlord landlord) throws ClassCastException
ClassCastExceptionpublic boolean canContainKey(Object key)
LeaseMapcanContainKey in interface LeaseMapcanContainKey in class LandlordLeaseMapkey - an object that should be a leaseLease.canBatch(net.jini.core.lease.Lease)Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.