Move OperationLimiter.acquire() warnings to callers
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / OperationLimiter.java
index ea93f1f5ad501d01e80f6e4a62853cf3eeed35d5..e1fee6d62b485393f3f98f9c3f9ffcfe64f34db9 100644 (file)
@@ -45,8 +45,6 @@ public class OperationLimiter  {
             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);
@@ -66,7 +64,8 @@ public class OperationLimiter  {
         this.semaphore.release(permits);
     }
 
-    public TransactionIdentifier getIdentifier() {
+    @VisibleForTesting
+    TransactionIdentifier getIdentifier() {
         return identifier;
     }