|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.iom.orb.ResourceTracker
public class ResourceTracker
A repository of resources that need to be shutdown all at once (eg when a container is destroyed). The ResourceTracker is itself a tracked resource so that resource trackers can be nested. The ResourceTracker must be enabled by calling enable() before it will track any resources. Some resources such as ThreadPool automatically add themselves to the ResourceTracker.
Constructor Summary | |
---|---|
ResourceTracker()
Construct a resource tracker. |
Method Summary | |
---|---|
void |
enable()
Enable a resource tracker. |
static ResourceTracker |
getInstance()
Get the default resource tracker. |
void |
shutdown(boolean waitForCompletion)
Shutdown all tracked resources. |
void |
trackResource(com.sas.iom.orb.TrackedResourceInterface resource)
Track a resource. |
void |
untrackResource(com.sas.iom.orb.TrackedResourceInterface resource)
Remove a resource from the tracker. |
Constructor Detail |
---|
public ResourceTracker()
Method Detail |
---|
public static ResourceTracker getInstance()
public void enable()
public void trackResource(com.sas.iom.orb.TrackedResourceInterface resource)
resource
- the resource to trackpublic void untrackResource(com.sas.iom.orb.TrackedResourceInterface resource)
resource
- the resource to removepublic void shutdown(boolean waitForCompletion)
shutdown
in interface com.sas.iom.orb.TrackedResourceInterface
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |