public abstract class TraceableResource extends Resource
Usage: replace the Resource
with a TraceableResource
e.g., public myResource extends Resource { ...
}
would be replaced with public myResource extends TraceableResource {...}
Constructor and Description |
---|
TraceableResource() |
Modifier and Type | Method and Description |
---|---|
boolean |
acquire()
Atomically acquires a free resource.
|
void |
release()
Atomically sets this resource as free; usually when returning a resource to the pool.
|
clear, isAcquired, isFromPool, setAcquired, setFromPool
public void release()
IResource
Before releasing the resource back into the pool,
is invoked.IResource.clear()
public boolean acquire()
IResource
Copyright © GigaSpaces.