com.sun.jini.reggie
Class ConstrainableRegistrarLeaseMap
java.lang.Object
com.sun.jini.lease.AbstractLeaseMap
com.sun.jini.reggie.RegistrarLeaseMap
com.sun.jini.reggie.ConstrainableRegistrarLeaseMap
- All Implemented Interfaces:
- Map, LeaseMap
final class ConstrainableRegistrarLeaseMap
- extends RegistrarLeaseMap
RegistrarLeaseMap subclass that supports constraints.
- Author:
- Sun Microsystems, Inc.
Field Summary |
(package private) static Method[] |
methodMappings
Mappings between Lease methods and Registrar lease-batching methods |
Method Summary |
boolean |
canContainKey(Object key)
Only allow leases permitted by RegistrarLeaseMap with compatible
constraints. |
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 |
methodMappings
static final Method[] methodMappings
- Mappings between Lease methods and Registrar lease-batching methods
ConstrainableRegistrarLeaseMap
ConstrainableRegistrarLeaseMap(RegistrarLease lease,
long duration)
- Constructs lease map containing a mapping from the given constrainable
lease to the specified duration.
canContainKey
public boolean canContainKey(Object key)
- Only allow leases permitted by RegistrarLeaseMap with compatible
constraints.
- Specified by:
canContainKey
in interface LeaseMap
- Overrides:
canContainKey
in class RegistrarLeaseMap
- Parameters:
key
- an object that should be a lease
- Returns:
- true if the lease can be renewed and cancelled in a
a batch with other leases
- See Also:
Lease.canBatch(net.jini.core.lease.Lease)
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.