com.sun.jini.norm
Class DeformedLeaseList

java.lang.Object
  extended by com.sun.jini.norm.DeformedLeaseList

 class DeformedLeaseList
extends Object

DeformedLeaseList provides a list for keeping track of of client lease that could not be fully recovered during log recovery. Unless otherwise noted all the methods in the class are not thread safe.

Author:
Sun Microsystems, Inc.

Field Summary
private  Set leases
          A list of all the leases we are tracking.
 
Constructor Summary
DeformedLeaseList()
           
 
Method Summary
(package private)  void add(ClientLeaseWrapper clw)
          Add a wrapped client lease to the list of deformed client leases.
(package private)  ClientLeaseWrapper query(Lease clientLease, Map table)
          Query the list to see if the specified client lease is in this list of deformed leases.
(package private)  void remove(ClientLeaseWrapper clw)
          Remove a lease from the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

leases

private Set leases
A list of all the leases we are tracking.

Constructor Detail

DeformedLeaseList

DeformedLeaseList()
Method Detail

add

void add(ClientLeaseWrapper clw)
Add a wrapped client lease to the list of deformed client leases. This method is not thread safe.

Parameters:
clw - a deformed client lease

remove

void remove(ClientLeaseWrapper clw)
Remove a lease from the list. This method is not thread safe.

Parameters:
clw - a deformed client lease

query

ClientLeaseWrapper query(Lease clientLease,
                         Map table)
Query the list to see if the specified client lease is in this list of deformed leases. If it is, return the existing client lease wrapper for this client lease. During the query, any client lease wrappers (including the target if found) which are discovered to no longer be deformed will be inserted into the passed table using their associated client lease as a key, and removed from the list of deformed leases. This method is not thread safe.

Parameters:
clientLease - the client lease which may be referenced by a deformed client lease wrapper
table - a table mapping client leases to client lease wrappers. Any client lease wrappers encountered during the query that are no longer deformed will be placed in this table. It is assumed that no other thread is trying to access this table.
Returns:
if it could be found, the client lease wrapper that goes with cl, null otherwise


Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.