Bug 9060: Remove un-used Instant getObjectCreated() from CloseTracked
[controller.git] / opendaylight / md-sal / mdsal-trace / dom-impl / src / main / java / org / opendaylight / controller / md / sal / trace / closetracker / impl / AbstractCloseTracked.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 javax.annotation.Nullable;
11
12 /**
13  * Convenience abstract base class for {@link CloseTracked} implementors.
14  *
15  * @author Michael Vorburger.ch
16  */
17 public abstract class AbstractCloseTracked<T extends AbstractCloseTracked<T>> implements CloseTracked<T> {
18
19     private final CloseTrackedTrait<T> closeTracker;
20
21     protected AbstractCloseTracked(CloseTrackedRegistry<T> transactionChainRegistry) {
22         this.closeTracker = new CloseTrackedTrait<>(transactionChainRegistry);
23     }
24
25     protected void removeFromTrackedRegistry() {
26         closeTracker.removeFromTrackedRegistry();
27     }
28
29     @Override
30     public @Nullable StackTraceElement[] getAllocationContextStackTrace() {
31         return closeTracker.getAllocationContextStackTrace();
32     }
33 }

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