if (semaphore.tryAcquire(acquirePermits, acquireTimeout, TimeUnit.NANOSECONDS)) {
return true;
}
-
- LOG.warn("Failed to acquire operation permit for transaction {}", identifier);
} catch (InterruptedException e) {
if (LOG.isDebugEnabled()) {
LOG.debug("Interrupted when trying to acquire operation permit for transaction {}", identifier, e);
this.semaphore.release(permits);
}
- public TransactionIdentifier getIdentifier() {
+ @VisibleForTesting
+ TransactionIdentifier getIdentifier() {
return identifier;
}