Bug 9060: TracingBroker printOpenTransactions
[controller.git] / opendaylight / md-sal / mdsal-trace / dom-impl / src / main / java / org / opendaylight / controller / md / sal / trace / closetracker / impl / CloseTrackedTrait.java
index b846c04..b1b4131 100644 (file)
@@ -24,13 +24,15 @@ public class CloseTrackedTrait<T extends CloseTracked<T>> implements CloseTracke
 
     private final @Nullable Throwable allocationContext;
     private final CloseTrackedRegistry<T> closeTrackedRegistry;
+    private final CloseTracked<T> realCloseTracked;
 
-    public CloseTrackedTrait(CloseTrackedRegistry<T> transactionChainRegistry) {
+    public CloseTrackedTrait(CloseTrackedRegistry<T> transactionChainRegistry, CloseTracked<T> realCloseTracked) {
         if (transactionChainRegistry.isDebugContextEnabled()) {
             this.allocationContext = new Throwable("allocated at");
         } else {
             this.allocationContext = null;
         }
+        this.realCloseTracked = Objects.requireNonNull(realCloseTracked, "realCloseTracked");
         this.closeTrackedRegistry = Objects.requireNonNull(transactionChainRegistry, "transactionChainRegistry");
         this.closeTrackedRegistry.add(this);
     }
@@ -44,4 +46,9 @@ public class CloseTrackedTrait<T extends CloseTracked<T>> implements CloseTracke
         closeTrackedRegistry.remove(this);
     }
 
+    @Override
+    public CloseTracked<T> getRealCloseTracked() {
+        return realCloseTracked;
+    }
+
 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.