public Lease acquire(long time, TimeUnit unit) throws Exception
    {
        Collection<Lease> leases = acquire(1, time, unit);
        return (leases != null) ? leases.iterator().next() : null;
    }
public Lease acquire ( long time , TimeUnit unit ) throws Exception { Collection < Lease > leases = acquire ( 1 , time , unit ) ; return ( leases != null ) ? leases . iterator ( ) . next ( ) : null ; }
<p>Acquire a lease. If no leases are available, this method blocks until either the maximum
number of leases is increased or another client/process closes a lease. However, this method
will only block to a maximum of the time parameters given.</p>
<p>The client must close the lease when it is done with it. You should do this in a
<code>finally</code> block.</p>

@param time time to wait
@param unit time unit
@return the new lease or null if time ran out
@throws Exception ZK errors, interruptions, etc.