2 * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.md.sal.trace.closetracker.impl;
10 import javax.annotation.Nullable;
13 * Object which can track where something has been created, and if it has been correctly "closed".
15 * <p>Includes preserving the context of the call stack which created an object, and the instant it was created.
17 * @author Michael Vorburger.ch
19 public interface CloseTracked<T extends CloseTracked<T>> {
21 @Nullable StackTraceElement[] getAllocationContextStackTrace();
23 CloseTracked<T> getRealCloseTracked();