Acquires a permit from this semaphore, only if one is available at the time of invocation.
Acquires a permit, if one is available and returns immediately, with the value {@code true}, reducing the number of available permits by one.
If no permit is available then this method will return immediately with the value {@code false}.
Even when this semaphore has been set to use a fair ordering policy, a call to {@code tryAcquire()} willimmediately acquire a permit if one is available, whether or not other threads are currently waiting. This "barging" behavior can be useful in certain circumstances, even though it breaks fairness. If you want to honor the fairness setting, then use {@link #tryAcquire(long,TimeUnit) tryAcquire(0, TimeUnit.SECONDS) }which is almost equivalent (it also detects interruption).
@return {@code true} if a permit was acquired and {@code false}otherwise