/** * Wait for the reference of the volume removed from a previous * {@link #removeVolume(FsVolumeImpl)} call to be released. * * @param sleepMillis interval to recheck. */ void waitVolumeRemoved(int sleepMillis, Condition condition) { while (!checkVolumesRemoved()) { if (FsDatasetImpl.LOG.isDebugEnabled()) { FsDatasetImpl.LOG.debug("Waiting for volume reference to be released."); } try { condition.await(sleepMillis, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { FsDatasetImpl.LOG.info("Thread interrupted when waiting for " + "volume reference to be released."); Thread.currentThread().interrupt(); } } FsDatasetImpl.LOG.info("Volume reference is released."); }