public final void runInner() throws IOException { while (!isStopped()) { ThreadU.sleepMillis(pollInterval); write(); } MutexU.notifyAll(this); }
private int waitForData(final Session session, final long pollInterval) throws IOException { int condition; do { ThreadU.sleepMillis(pollInterval); condition = session.waitForCondition(Const.DATA, pollInterval); } while ((condition & Const.DATA) != 0); return condition; }