com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager Class Reference

Collaboration diagram for com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager:
Collaboration graph
[legend]

List of all members.

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()

Detailed Description

Manages TS.


Constructor & Destructor Documentation

com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager::ComponentInfoTopologicalSortManager ( HandleDataStore  components,
HandleDataStore  containers,
ReaderPreferenceReadWriteLock  activationPendingRWLock,
Set  pendingContainerShutdown,
ThreadPoolExecutor  threadPool,
Logger  logger 
) [inline]

Member Function Documentation

synchronized void com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager::destroy (  )  [inline]

Destroy (terminate thread).

References destroyed.

Referenced by com::cosylab::acs::maci::manager::ManagerImpl::shutdown().

ComponentInfo [] com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager::getComponentShutdownOrder ( ContainerInfo  containerInfo  )  [inline]

Get component shutdown order for container.

Parameters:
containerInfo valid container's info, if null complete TS is returned.
Returns:
component shutdown order

References currentTSList, com::cosylab::acs::maci::ComponentInfo::getContainerName(), com::cosylab::acs::maci::ContainerInfo::getName(), and listLock.

Referenced by com::cosylab::acs::maci::manager::ManagerImpl::shutdown(), and com::cosylab::acs::maci::manager::ManagerImpl::shutdownContainer().

void com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager::notifyContainerShutdownOrder ( ContainerInfo  containerInfo,
int[]  handles 
) [inline, private]

Task thats invokes Container::shutdown method.

Add new notification. This will keep only the latest one.

Parameters:
handles 
Returns:
true if notification is being accepted

References com::cosylab::acs::maci::ContainerInfo::getContainer(), logger, pendingContainerNotifications, run(), and threadPool.

Referenced by run().

synchronized void com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager::notifyTopologyChange ( int  containerHandleToNotify  )  [inline]
void com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager::requestTopologicalSort (  )  [inline]
void com::cosylab::acs::maci::manager::ComponentInfoTopologicalSortManager::run (  )  [inline]

Member Data Documentation

Lock.

Referenced by requestTopologicalSort(), and run().

Components data store.

Referenced by requestTopologicalSort(), and run().

Containers data store.

Referenced by run().

Current ordered TS list.

Referenced by getComponentShutdownOrder(), requestTopologicalSort(), and run().

Stastus flag.

Referenced by destroy(), and run().

Logger.

Referenced by notifyContainerShutdownOrder().

Informs containers abouts its component shutdown order.

Parameters:
containerInfo container to inform
handles ordered list of component handles

Referenced by notifyContainerShutdownOrder().

List of all pending container shutdowns.

Referenced by run().

Thread pool (guarantees order of execution).

Referenced by notifyContainerShutdownOrder().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2