|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.norm.LeaseTable
class LeaseTable
Maps client leases to the wrapper objects that we use internally.
Internally we keep two tables of client leases, one mapping client leases to client lease wrappers, the other a list of client lease wrappers whose leases could not be unpacked (aka "deformed wrappers") when they were added (and thus could not be put in the map). This bifurcation is not exposed to the client.
Unless otherwise noted the methods of this class are not thread safe.
Field Summary | |
---|---|
private DeformedLeaseList |
deformedLeases
The list we store deformed wrappers in. |
private Map |
leaseTable
The map we use to map client leases to wrappers. |
Constructor Summary | |
---|---|
LeaseTable()
|
Method Summary | |
---|---|
(package private) ClientLeaseWrapper |
get(Lease clientLease)
Find the client lease wrapper associated with the passed lease. |
(package private) void |
put(ClientLeaseWrapper clw)
Add a mapping from lease wrapper to client lease. |
(package private) void |
remove(ClientLeaseWrapper clw)
Remove a lease from the table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final DeformedLeaseList deformedLeases
private final Map leaseTable
Constructor Detail |
---|
LeaseTable()
Method Detail |
---|
ClientLeaseWrapper get(Lease clientLease)
clientLease
- the lease we need the wrapper for
null
if we don't know about this leasevoid put(ClientLeaseWrapper clw)
clw
- client lease wrapper, and client lease to add to
tablevoid remove(ClientLeaseWrapper clw)
clw
- client lease wrapper for the lease we want to
remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |