|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
com.sun.jini.thread.InterruptedStatusThread
com.sun.jini.norm.LRMEventListener
class LRMEventListener
Object that transfers events from the Lease Renewal Manager to the rest of Norm Server. Isolates the renewal manager from having to block on the snapshot locks.
Nested Class Summary | |
---|---|
private static class |
LRMEventListener.Discriminator
Trivial container class to tell us if we are processing the given wrapper because of a failure event or a desired expiration reached event. |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
(package private) static LeaseDeniedException |
EXPIRED_SET_EXCEPTION
Any events that hold this object are ignored |
private static Logger |
logger
Logger for logging messages for this class |
private Queue |
queue
Queue we use to decouple the reception of events from the lease renewal manager from the scheduling of the sending of remote events and modifying our internal tables (which both require obtaining serious locks). |
private NormServerBaseImpl |
server
Ref to the main server object which has all the top level methods |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
LRMEventListener(NormServerBaseImpl server)
Simple constructor |
Method Summary | |
---|---|
void |
expirationReached(LeaseRenewalEvent e)
Method used to delivered desired expiration reached events. |
void |
notify(LeaseRenewalEvent e)
Called by the LeaseRenewalManager when it cannot
renew a lease that it is managing, and the lease's desired
expiration time has not yet been reached. |
void |
run()
|
Methods inherited from class com.sun.jini.thread.InterruptedStatusThread |
---|
hasBeenInterrupted, interrupt |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final Logger logger
private final NormServerBaseImpl server
private final Queue queue
static final LeaseDeniedException EXPIRED_SET_EXCEPTION
Constructor Detail |
---|
LRMEventListener(NormServerBaseImpl server)
server
- Object that will make the actual internal updates and
schedule the sending of remote eventsMethod Detail |
---|
public void notify(LeaseRenewalEvent e)
LeaseListener
LeaseRenewalManager
when it cannot
renew a lease that it is managing, and the lease's desired
expiration time has not yet been reached.
Note that, prior to invoking this method, the
LeaseRenewalManager
removes the affected lease from
the managed set of leases. Note also that, because of the
reentrancy guarantee made by the
LeaseRenewalManager
, new leases can be safely added
by this method.
notify
in interface LeaseListener
e
- instance of LeaseRenewalEvent
containing
information about the lease that the
LeaseRenewalManager
was unable to renew, as
well as information about the condition that made the
LeaseRenewalManager
fail to renew the leasepublic void expirationReached(LeaseRenewalEvent e)
DesiredExpirationListener
getException
method of the passed event will always
return null
.
Note that, prior to invoking this method, the
LeaseRenewalManager
removes the affected lease from
the managed set of leases. Note also that, because of the
reentrancy guarantee made by the
LeaseRenewalManager
, it is safe to call back into
the renewal manager from this method.
expirationReached
in interface DesiredExpirationListener
e
- instance of LeaseRenewalEvent
containing
information about the lease that was removed from the
LeaseRenewalManager
because its desired
expiration was reachedpublic void run()
run
in interface Runnable
run
in class Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |