T - The type of the contained resourcepublic class StrongReferenceScopedResource<T> extends Object
ScopedResource that will always retain a strong reference to the
contained resource, even when not "in use"| Modifier and Type | Method and Description |
|---|---|
void |
close()
Signifies the end of the scope, will return the resource to the "pool" for use by other acquirers
|
void |
closeResource()
Close the contained resource and clear any references
|
T |
get()
Get the contained resource
|
long |
getCreatedTimeNanos()
The time this resource was created
|
Class<?> |
getType()
Get the type of object contained, may return null
|
public T get()
ScopedResourcepublic void closeResource()
public Class<?> getType()
public void close()
ScopedResourceclose in interface Closeableclose in interface AutoCloseableclose in interface ScopedResource<T>public long getCreatedTimeNanos()
System.nanoTime() of creationCopyright © 2024. All rights reserved.