330 |
|
* This "barging" behavior can be useful in certain |
331 |
|
* circumstances, even though it breaks fairness. If you want to honor |
332 |
|
* the fairness setting, then use |
333 |
< |
* {@link #tryAcquire(long, TimeUnit) tryAcquire(0, TimeUnit.SECONDS) } |
333 |
> |
* {@link #tryAcquire(long, TimeUnit) tryAcquire(0, TimeUnit.SECONDS)} |
334 |
|
* which is almost equivalent (it also detects interruption). |
335 |
|
* |
336 |
|
* @return {@code true} if a permit was acquired and {@code false} |
494 |
|
* "barging" behavior can be useful in certain |
495 |
|
* circumstances, even though it breaks fairness. If you want to |
496 |
|
* honor the fairness setting, then use {@link #tryAcquire(int, |
497 |
< |
* long, TimeUnit) tryAcquire(permits, 0, TimeUnit.SECONDS) } |
497 |
> |
* long, TimeUnit) tryAcquire(permits, 0, TimeUnit.SECONDS)} |
498 |
|
* which is almost equivalent (it also detects interruption). |
499 |
|
* |
500 |
|
* @param permits the number of permits to acquire |