public class CloseTrackedTrait<T extends CloseTracked<T>> extends Object implements CloseTracked<T>
CloseTracked
which can be used as a field in
another class which implements CloseTracked
and delegates its methods
to this.
This is useful if that class already has another parent class. If it does not, then it's typically more convenient to just extend AbstractCloseTracked.
Constructor and Description |
---|
CloseTrackedTrait(CloseTrackedRegistry<T> transactionChainRegistry,
CloseTracked<T> realCloseTracked) |
Modifier and Type | Method and Description |
---|---|
StackTraceElement[] |
getAllocationContextStackTrace()
This returns the allocation context as
StackTraceElement s. |
CloseTracked<T> |
getRealCloseTracked() |
void |
removeFromTrackedRegistry() |
public CloseTrackedTrait(CloseTrackedRegistry<T> transactionChainRegistry, CloseTracked<T> realCloseTracked)
@Nullable public StackTraceElement[] getAllocationContextStackTrace()
CloseTracked
StackTraceElement
s. NB that
this is a relatively EXPENSIVE 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.getAllocationContextStackTrace
in interface CloseTracked<T extends CloseTracked<T>>
public void removeFromTrackedRegistry()
public CloseTracked<T> getRealCloseTracked()
getRealCloseTracked
in interface CloseTracked<T extends CloseTracked<T>>
Copyright © 2019 OpenDaylight. All rights reserved.