|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.mahalo.LeaseExpirationMgr
class LeaseExpirationMgr
Lease Mgr implementation that aggressively expires leases as they expiration times occur. Synchronizes on resource before canceling it.
LeaseManager
Nested Class Summary | |
---|---|
private class |
LeaseExpirationMgr.Canceler
Objects that do the actually cancel the resource in question, stuck in WakeupManager |
(package private) static interface |
LeaseExpirationMgr.Expirer
Interface that allows LeaseExpirationMgr to expire resources. |
Field Summary | |
---|---|
private WakeupManager |
expirationQueue
|
private LeaseExpirationMgr.Expirer |
landlord
|
private WeakTable |
ticketMap
|
Constructor Summary | |
---|---|
LeaseExpirationMgr(LeaseExpirationMgr.Expirer landlord)
Create a LeaseExpirationMgr to aggressively expire
the leases of the passed landlord (implementing
Expirer is trivial for a Landlord . |
Method Summary | |
---|---|
void |
keyGC(Object value)
Called by WeakTable when it notices that a key has been collected and the value still exists. |
void |
register(LeasedResource resource)
Notifies the manager of a new lease being created. |
void |
renewed(LeasedResource resource)
Notifies the manager of a lease being renewed. |
private void |
schedule(LeasedResource resource)
Schedule a leased resource to be reaped in the future. |
(package private) void |
terminate()
Terminate the LeaseExpirationMgr , killing any
threads it has started |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private WeakTable ticketMap
private LeaseExpirationMgr.Expirer landlord
private WakeupManager expirationQueue
Constructor Detail |
---|
LeaseExpirationMgr(LeaseExpirationMgr.Expirer landlord)
LeaseExpirationMgr
to aggressively expire
the leases of the passed landlord (implementing
Expirer
is trivial for a Landlord
.
Method Detail |
---|
void terminate()
LeaseExpirationMgr
, killing any
threads it has started
public void register(LeasedResource resource)
LeaseManager
register
in interface LeaseManager
resource
- The resource associated with the new Lease.public void renewed(LeasedResource resource)
LeaseManager
renewed
in interface LeaseManager
resource
- The resource associated with the new Lease.private void schedule(LeasedResource resource)
public void keyGC(Object value)
WeakTable.KeyGCHandler
keyGC
in interface WeakTable.KeyGCHandler
value
- The value associated with the collected key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |