Methods Summary |
---|
public synchronized void | addAccount(Account3 newAccount)
_accounts.add(newAccount);
|
private synchronized void | decrementLockTimers()
Iterator i = _accounts.iterator();
while (i.hasNext()) {
Account3_Impl2 nextAccount = (Account3_Impl2) i.next();
nextAccount.decrementLockTimer(THREAD_SLEEP_TIME);
}
|
public static synchronized com.ora.rmibook.chapter12.bank.Account3_Impl2_LockThread | getSingleton()
if (null == _singleton) {
_singleton = new Account3_Impl2_LockThread();
_singleton.start();
}
return _singleton;
|
public void | run()
while (true) {
try {
Thread.sleep(THREAD_SLEEP_TIME);
} catch (Exception ignored) {
}
decrementLockTimers();
}
|