Deprecate all MD-SAL APIs
[controller.git] / opendaylight / md-sal / mdsal-trace / dom-impl / src / main / java / org / opendaylight / controller / md / sal / trace / closetracker / impl / CloseTracked.java
index f5fd341b55c4a169e19b6a82b593de9b70e92536..18e04d708ae4461fb2b44189070f000cff73c579 100644 (file)
@@ -7,17 +7,26 @@
  */
 package org.opendaylight.controller.md.sal.trace.closetracker.impl;
 
-import javax.annotation.Nullable;
+import org.eclipse.jdt.annotation.Nullable;
 
 /**
- * Object which can track where it has been created, and if it has been correctly "closed".
+ * Object which can track where something has been created, and if it has been correctly "closed".
  *
- * <p>Includes preserving the context of the call stack which created this object, and the instant it was created.
+ * <p>Includes preserving the context of the call stack which created an object, and the instant it was created.
  *
  * @author Michael Vorburger.ch
  */
+@Deprecated
 public interface CloseTracked<T extends CloseTracked<T>> {
 
+    /**
+     * This returns the allocation context as {@link StackTraceElement}s. NB that
+     * this is a relatively <b>EXPENSIVE</b> operation! You should only ever call
+     * this when you really need to, e.g. when you actually produce output for
+     * humans, but not too early.
+     */
+    // TODO When we're on Java 9, then instead return a StackWalker.StackFrame[] here?
     @Nullable StackTraceElement[] getAllocationContextStackTrace();
 
+    CloseTracked<T> getRealCloseTracked();
 }