T - The type of object contained in the poolpublic interface ScopedResourcePool<T>
get() and that lease is relinquished when
ScopedResource.close() is called.
Example of use:
try (ScopedResource<Wire> sharedWire = sharedWireScopedThreadLocal.get()) {
Wire wire = sharedWire.get();
// ... do something with the wire
} // it is returned for use by inner scopes here
| Modifier and Type | Method and Description |
|---|---|
ScopedResource<T> |
get()
Get a scoped instance of the shared resource
|
ScopedResource<T> get()
ScopedResource, to be closed once it is finished being usedCopyright © 2024. All rights reserved.