
Public Member Functions | |
| ComponentInfoTopologicalSortManager (HandleDataStore components, HandleDataStore containers, ReaderPreferenceReadWriteLock activationPendingRWLock, Set pendingContainerShutdown, ThreadPoolExecutor threadPool, Logger logger) | |
| void | run () |
| void | requestTopologicalSort () |
| synchronized void | notifyTopologyChange (int containerHandleToNotify) |
| ComponentInfo[] | getComponentShutdownOrder (ContainerInfo containerInfo) |
| synchronized void | destroy () |
Private Member Functions | |
| void | notifyContainerShutdownOrder (ContainerInfo containerInfo, int[] handles) |
Private Attributes | |
| HandleDataStore | components |
| HandleDataStore | containers |
| volatile boolean | destroyed = false |
| ReaderPreferenceReadWriteLock | activationPendingRWLock |
| HashSet | dirtyContainerMap = new HashSet() |
| Object | listLock = new Object() |
| ComponentInfo[] | currentTSList = new ComponentInfo[0] |
| Set | pendingContainerShutdown |
| ThreadPoolExecutor | threadPool |
| Logger | logger |
| Map | pendingContainerNotifications = new HashMap() |
|
||||||||||||||||||||||||||||
|
|
|
|
Destroy (terminate thread). |
|
|
Get component shutdown order for container.
|
|
||||||||||||
|
Task thats invokes Add new notification. This will keep only the latest one.
|
|
|
Notify about (possible) topology change and initiates sorting.
|
|
|
Request topological sort. |
|
|
(Sync is clean since activationPendingRWLock is acquired and all notify request is issued only from its reader lock).
|
|
|
Lock. |
|
|
Components data store. |
|
|
Containers data store. |
|
|
Current ordered TS list. |
|
|
Stastus flag. |
|
|
Dirty map. |
|
|
Lock. |
|
|
Logger. |
|
|
Informs containers abouts its component shutdown order.
|
|
|
List of all pending container shutdowns. |
|
|
Thread pool (guarantees order of execution). |
1.3.8