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 |
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)
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.
collectorCompName | Name of collector component. |
null
if none of the blobbers could add the collector. 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().
void alma.acs.monitoring.controller.ControllerImpl.cleanUp | ( | ) |
synchronized void alma.acs.monitoring.controller.ControllerImpl.deregisterCollector | ( | String | inComponentName | ) |
BlobberOperations alma.acs.monitoring.controller.ControllerImpl.getBlobber | ( | String | inBlobberName | ) | throws AcsJContainerServicesEx [protected] |
Gets the blobber component reference for the given component name.
AcsJContainerServicesEx |
References alma.acs.container.ContainerServices.getComponent(), alma.acs.component.ComponentImplBase.m_containerServices, and alma.acs.monitoring.controller.ControllerImpl.myBlobberRefMap.
Referenced by alma.acs.monitoring.controller.ControllerImpl.addCollector(), alma.acs.monitoring.controller.ControllerImpl.deregisterCollector(), and alma.acs.monitoring.controller.ControllerImpl.isRegistered().
void alma.acs.monitoring.controller.ControllerImpl.initialize | ( | ContainerServices | inContainerServices | ) | throws ComponentLifecycleException |
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.
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 | ) |
void alma.acs.monitoring.controller.ControllerImpl.registerKnownCollectors | ( | String | blobberCompName | ) |
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().
final List<String> alma.acs.monitoring.controller.ControllerImpl.myBlobberList = new ArrayList<String>() [protected] |
List of blobber component names.
Referenced by alma.acs.monitoring.controller.ControllerImpl.addCollector(), alma.acs.monitoring.controller.ControllerImpl.cleanUp(), alma.acs.monitoring.controller.ControllerImpl.deregisterCollector(), alma.acs.monitoring.controller.ControllerImpl.initialize(), and alma.acs.monitoring.controller.ControllerImpl.isRegistered().
int alma.acs.monitoring.controller.ControllerImpl.myBlobberListIndex = 0 [protected] |
Current position in myBlobberList, pointing to the registered blobber component which will serve the next incoming collector.
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().