try
{
if (!semaphore.tryAcquire(props.permits(), props.timeout(), props.unit()))
{
throw new LockAcquisitionFailureException("Failed to acquire permit for @SemaphoredMethod. Timeout reached.");
}
}
catch (InterruptedException e)
{
throw new LockAcquisitionFailureException("Failed to acquire permit for @Semaphored class", e);
}