Class CloseableResourceInfo
- java.lang.Object
-
- com.carrotsearch.randomizedtesting.CloseableResourceInfo
-
final class CloseableResourceInfo extends java.lang.Object
Allocation information (Thread, allocation stack) for tracking disposable resources.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StackTraceElement[]
allocationStack
private java.io.Closeable
resource
private LifecycleScope
scope
private java.lang.String
threadName
-
Constructor Summary
Constructors Constructor Description CloseableResourceInfo(java.io.Closeable resource, LifecycleScope scope, java.lang.Thread t, java.lang.StackTraceElement[] allocationStack)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StackTraceElement[]
getAllocationStack()
java.io.Closeable
getResource()
LifecycleScope
getScope()
java.lang.String
getThreadName()
Return the allocating thread's name at the time of creating this resource info.
-
-
-
Field Detail
-
resource
private final java.io.Closeable resource
-
scope
private final LifecycleScope scope
-
allocationStack
private final java.lang.StackTraceElement[] allocationStack
-
threadName
private final java.lang.String threadName
-
-
Constructor Detail
-
CloseableResourceInfo
public CloseableResourceInfo(java.io.Closeable resource, LifecycleScope scope, java.lang.Thread t, java.lang.StackTraceElement[] allocationStack)
-
-
Method Detail
-
getResource
public java.io.Closeable getResource()
-
getAllocationStack
public java.lang.StackTraceElement[] getAllocationStack()
-
getScope
public LifecycleScope getScope()
-
getThreadName
public java.lang.String getThreadName()
Return the allocating thread's name at the time of creating this resource info.
-
-