com.sun.jini.reggie
Class ConstrainableRegistrarLeaseMap

java.lang.Object
  extended by com.sun.jini.lease.AbstractLeaseMap
      extended by com.sun.jini.reggie.RegistrarLeaseMap
          extended by 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
 
Fields inherited from class com.sun.jini.reggie.RegistrarLeaseMap
registrarID, server
 
Fields inherited from class com.sun.jini.lease.AbstractLeaseMap
map
 
Constructor Summary
ConstrainableRegistrarLeaseMap(RegistrarLease lease, long duration)
          Constructs lease map containing a mapping from the given constrainable lease to the specified duration.
 
Method Summary
 boolean canContainKey(Object key)
          Only allow leases permitted by RegistrarLeaseMap with compatible constraints.
 
Methods inherited from class com.sun.jini.reggie.RegistrarLeaseMap
cancelAll, renewAll
 
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

methodMappings

static final Method[] methodMappings
Mappings between Lease methods and Registrar lease-batching methods

Constructor Detail

ConstrainableRegistrarLeaseMap

ConstrainableRegistrarLeaseMap(RegistrarLease lease,
                               long duration)
Constructs lease map containing a mapping from the given constrainable lease to the specified duration.

Method Detail

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.