Fix modernization issues
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / md / sal / dom / broker / impl / PingPongTransactionChain.java
index af474c5c56c5370e9d6b2c7845e42a27d8984ea7..6d661f1b83075c07de624f347caf8822adb288df 100644 (file)
@@ -20,7 +20,8 @@ import java.util.AbstractMap.SimpleImmutableEntry;
 import java.util.Map.Entry;
 import java.util.concurrent.CancellationException;
 import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
+import org.checkerframework.checker.lock.qual.Holding;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
@@ -57,6 +58,7 @@ import org.slf4j.LoggerFactory;
  * counts as an outstanding transaction and the user may not allocate multiple
  * read-only transactions at the same time.
  */
+@Deprecated
 public final class PingPongTransactionChain implements DOMTransactionChain {
     private static final Logger LOG = LoggerFactory.getLogger(PingPongTransactionChain.class);
     private final TransactionChainListener listener;
@@ -210,7 +212,7 @@ public final class PingPongTransactionChain implements DOMTransactionChain {
      * this method has completed executing. Also inflightTx may be updated outside
      * the lock, hence we need to re-check.
      */
-    @GuardedBy("this")
+    @Holding("this")
     private void processIfReady() {
         if (inflightTx == null) {
             final PingPongTransaction tx = READY_UPDATER.getAndSet(this, null);
@@ -226,7 +228,7 @@ public final class PingPongTransactionChain implements DOMTransactionChain {
      *
      * @param tx Transaction which needs processing.
      */
-    @GuardedBy("this")
+    @Holding("this")
     private void processTransaction(final @NonNull PingPongTransaction tx) {
         if (failed) {
             LOG.debug("Cancelling transaction {}", tx);