public boolean isCompleted() { return executor.isCompleted(); }
/** * Waits until all enqueued operations are complete, but at most the given amount of milliseconds. If the thread * gets interrupted, any {@link InterruptedException} will be rethrown as a {@link DaoException}. * * @return true if operations completed in the given time frame. */ public synchronized boolean waitForCompletion(int maxMillis) { if (!isCompleted()) { try { wait(maxMillis); } catch (InterruptedException e) { throw new DaoException("Interrupted while waiting for all operations to complete", e); } } return isCompleted(); }
/** * Waits until all enqueued operations are complete. If the thread gets interrupted, any * {@link InterruptedException} will be rethrown as a {@link DaoException}. */ public synchronized void waitForCompletion() { while (!isCompleted()) { try { wait(); } catch (InterruptedException e) { throw new DaoException("Interrupted while waiting for all operations to complete", e); } } }
public boolean isCompleted() { return executor.isCompleted(); }
/** * Waits until all enqueued operations are complete, but at most the given amount of milliseconds. If the thread * gets interrupted, any {@link InterruptedException} will be rethrown as a {@link DaoException}. * * @return true if operations completed in the given time frame. */ public synchronized boolean waitForCompletion(int maxMillis) { if (!isCompleted()) { try { wait(maxMillis); } catch (InterruptedException e) { throw new DaoException("Interrupted while waiting for all operations to complete", e); } } return isCompleted(); }
/** * Waits until all enqueued operations are complete. If the thread gets interrupted, any * {@link InterruptedException} will be rethrown as a {@link DaoException}. */ public synchronized void waitForCompletion() { while (!isCompleted()) { try { wait(); } catch (InterruptedException e) { throw new DaoException("Interrupted while waiting for all operations to complete", e); } } }