|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--edu.virginia.cs.mng.hypercast.DeadlockMonitor
The run() method of this object checks sockets for deadlock and timeout. The thread checks all the sockets periodically. If an incoming one is not read for more than a certain time, it will creates a dropper thread to ensure progress. If a socket is idle for more than a certain time, the socket is closed.
| Field Summary | |
private int |
dropTime
The time a socket must be ignored by its receiving thread before a message is dropped. |
private boolean |
dying
True if the function die() has been called. |
private java.lang.Thread |
myThread
The deadlock monitoring thread |
private TCP_UnicastAdapter |
Parent
TCP_UnicastAdapter that created this object. |
private int |
timeoutTime
The time a socket must be idle before being closed. |
private boolean |
waiting
True if myThread is sleeping. |
private java.lang.Object |
waitingGuard
A lock to ensure that myThread is only interrupted while sleeping. |
| Constructor Summary | |
(package private) |
DeadlockMonitor(TCP_UnicastAdapter adapter,
int btime,
int ttime)
|
| Method Summary | |
void |
die()
Causes myThread to return from the run() method,
effectively killing it. |
void |
run()
Periodically checks all object in TCP_UnicastAdapter.incoming and
TCP_UnicastAdapter.outgoings to ensure they are active
and being read. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private TCP_UnicastAdapter Parent
private int dropTime
private int timeoutTime
private java.lang.Thread myThread
private boolean dying
private boolean waiting
myThread is sleeping.private java.lang.Object waitingGuard
myThread is only interrupted while sleeping.| Constructor Detail |
DeadlockMonitor(TCP_UnicastAdapter adapter,
int btime,
int ttime)
| Method Detail |
public void die()
myThread to return from the run() method,
effectively killing it.public void run()
TCP_UnicastAdapter.incoming and
TCP_UnicastAdapter.outgoings to ensure they are active
and being read.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||