1febe153eace20b415bde54d8b90278545de2bd1
[controller.git] / opendaylight / md-sal / mdsal-trace / dom-impl / src / main / java / org / opendaylight / controller / md / sal / trace / closetracker / impl / CloseTracked.java
1 /*
2  * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.md.sal.trace.closetracker.impl;
9
10 import java.time.Instant;
11 import javax.annotation.Nullable;
12
13 /**
14  * Object which can track where it has been created, and if it has been correctly "closed".
15  *
16  * <p>Includes preserving the context of the call stack which created this object, and the instant it was created.
17  *
18  * @author Michael Vorburger.ch
19  */
20 public interface CloseTracked<T extends CloseTracked<T>> {
21
22     Instant getObjectCreated();
23
24     @Nullable StackTraceElement[] getAllocationContextStackTrace();
25
26 }

©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.