/* This is an example file to show * how to use timeout for each lock request */ class LockRequest{ int id; boolean notified = false; synchronized void lwait(int time){ try{ wait(time); }catch (InterruptedException e){ System.out.println("lr is interrupted"); System.out.println("e="+e); } } synchronized void lnotify(){ notify(); notified = true; } }