synchronized (cachemonitor) {
cachemonitor.notifyAll();
long elapsed = System.currentTimeMillis() - begintime;
if (elapsed > timeout) {
log.debug("refreshCached reader timeout in " + elapsed + "ms");
throw new ZoieException("refreshCached reader timeout in " + elapsed + "ms");
}
long timetowait = Math.min(timeout - elapsed, 200);
try {
cachemonitor.wait(timetowait);
} catch (InterruptedException e) {