Classes | Public Member Functions | Protected Member Functions | Protected Attributes

alma.acs.monitoring.controller.ControllerImpl Class Reference

Inheritance diagram for alma.acs.monitoring.controller.ControllerImpl:
alma.acs.component.ComponentImplBase alma.acs.component.ComponentLifecycle

List of all members.

Classes

class  AsynchronousRegistration

Public Member Functions

void cleanUp ()
void initialize (ContainerServices inContainerServices) throws ComponentLifecycleException
synchronized void registerCollector (String collectorCompName)
synchronized void deregisterCollector (String inComponentName)
void registerKnownCollectors (String blobberCompName)

Protected Member Functions

String isRegistered (String inComponentName) throws AcsJContainerServicesEx
String addCollector (String collectorCompName) throws Exception
BlobberOperations getBlobber (String inBlobberName) throws AcsJContainerServicesEx

Protected Attributes

final List< String > myBlobberList = new ArrayList<String>()
final Map< String,
BlobberOperations > 
myBlobberRefMap = new HashMap<String, BlobberOperations>()
final Map< String, String > collector2BlobberName = new HashMap<String, String>()
int myBlobberListIndex = 0

Detailed Description

The monitor collector components contact the controller, to get assigned to a blobber.

(HSO): Any access to the blobber components should check for corba runtime exceptions, and those blobbers should eventually be deregistered (and the monitor collectors they served be re-assigned)


Member Function Documentation

String alma.acs.monitoring.controller.ControllerImpl.addCollector ( String  collectorCompName  )  throws Exception [protected]

Iterates over the list of blobbers, starting from myBlobberListIndex, and attempts to add the given collector to the first available blobber.

Parameters:
collectorCompName Name of collector component.
Returns:
Name of blobber component to which the collector was added, or null if none of the blobbers could add the collector.
Exceptions:
IllegalStateException if no blobber components are available. : This case should perhaps be treated together with having only blobbers that no longer accept collectors.
AcsJContainerServicesEx if a blobber component reference cannot be retrieved.

References alma.acs.monitoring.controller.ControllerImpl.collector2BlobberName, alma.acs.monitoring.controller.ControllerImpl.getBlobber(), alma.acs.component.ComponentImplBase.m_logger, alma.acs.monitoring.controller.ControllerImpl.myBlobberList, and alma.acs.monitoring.controller.ControllerImpl.myBlobberListIndex.

Referenced by alma.acs.monitoring.controller.ControllerImpl.registerCollector().

BlobberOperations alma.acs.monitoring.controller.ControllerImpl.getBlobber ( String  inBlobberName  )  throws AcsJContainerServicesEx [protected]
String alma.acs.monitoring.controller.ControllerImpl.isRegistered ( String  inComponentName  )  throws AcsJContainerServicesEx [protected]

Checks whether the given monitor collector component is registered with any of the blobber components.

Returns:
The matching blobber component name, or null if none was found.

References alma.acs.monitoring.controller.ControllerImpl.getBlobber(), alma.acs.component.ComponentImplBase.m_logger, and alma.acs.monitoring.controller.ControllerImpl.myBlobberList.

Referenced by alma.acs.monitoring.controller.ControllerImpl.registerCollector().

synchronized void alma.acs.monitoring.controller.ControllerImpl.registerCollector ( String  collectorCompName  ) 

Member Data Documentation

final Map<String, String> alma.acs.monitoring.controller.ControllerImpl.collector2BlobberName = new HashMap<String, String>() [protected]

Maps names of MonitorCollector components to the corresponding Blobber components. The blobber name is expected to be contained in myBlobberList.

Referenced by alma.acs.monitoring.controller.ControllerImpl.addCollector(), alma.acs.monitoring.controller.ControllerImpl.deregisterCollector(), and alma.acs.monitoring.controller.ControllerImpl.registerKnownCollectors().

Current position in myBlobberList, pointing to the registered blobber component which will serve the next incoming collector.

See also:
addCollector(String)

Referenced by alma.acs.monitoring.controller.ControllerImpl.addCollector().

final Map<String, BlobberOperations> alma.acs.monitoring.controller.ControllerImpl.myBlobberRefMap = new HashMap<String, BlobberOperations>() [protected]

Mapping Blobber name to known CORBA reference.

(HSO): If myBlobberRefMap and myBlobberList contain information about the same blobbers, (which it seems to me it does), then we should try to keep that data only once. How about using a LinkedHashMap for myBlobberRefMap whose reliable iteration order then makes myBlobberList unnecessary? We would avoid possible misalignment between the two, at the expense that we'd have to iterate over myBlobberRefMap.keySet where now we call myBlobberList(index).

Referenced by alma.acs.monitoring.controller.ControllerImpl.cleanUp(), and alma.acs.monitoring.controller.ControllerImpl.getBlobber().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties