public void sync(long amount,TimeUnit unit) throws IOException {
  try {
    latch.await(amount,unit);
  }
 catch (  InterruptedException e) {
    Thread.interrupted();
    throw IOExceptionSupport.create(e);
  }
  failOnError();
}

public void sync ( long amount , TimeUnit unit ) throws IOException { try { latch . await ( amount , unit ) ; } catch ( InterruptedException e ) { Thread . interrupted ( ) ; throw IOExceptionSupport . create ( e ) ; } failOnError ( ) ; }
timed wait for a response to a pending operation .
