Public Member Functions | |
void | initialize (ContainerServices inContainerServices) throws ComponentLifecycleException |
void | execute () |
void | cleanUp () |
CollectorListStatus | addCollector (String inComponentName) |
CollectorListStatus | containsCollector (String inComponentName) |
CollectorListStatus | removeCollector (String inComponentName) |
Protected Member Functions | |
BlobberPlugin | createBlobberPlugin () throws AcsJCouldntCreateObjectEx |
BlobberWorker | createWorker (BlobberPlugin blobberPlugin) throws AcsJCouldntCreateObjectEx |
Protected Attributes | |
BlobberWorker | myWorker |
int | collectorIntervalSec |
ThreadLoopRunner | blobberLoopRunner |
BlobberPlugin | blobberPlugin |
Implementation of the blobber component.
CollectorListStatus alma.acs.monitoring.blobber.BlobberImpl.addCollector | ( | String | inComponentName | ) |
void alma.acs.monitoring.blobber.BlobberImpl.cleanUp | ( | ) |
Modification of the collector interval during blobber runs is only used in the legacy tests, not for blobber operations. Remove this method and the tests, unless there is a clear purpose.
collectorIntervalSeconds | new interval in seconds, must be greater than zero. |
References alma.acs.monitoring.blobber.BlobberImpl.blobberLoopRunner, alma.acs.monitoring.blobber.BlobberImpl.blobberPlugin, alma.acs.concurrent.ThreadLoopRunner.isLoopRunning(), alma.acs.component.ComponentImplBase.m_logger, and alma.acs.concurrent.ThreadLoopRunner.shutdown().
CollectorListStatus alma.acs.monitoring.blobber.BlobberImpl.containsCollector | ( | String | inComponentName | ) |
BlobberPlugin alma.acs.monitoring.blobber.BlobberImpl.createBlobberPlugin | ( | ) | throws AcsJCouldntCreateObjectEx [protected] |
Creates (using reflection) an instance of alma.acs.monitoring.blobber.BlobberPluginAlmaImpl
that ARCHIVE/TMCDB/
modules must provide.
Overriding this method allows other projects or unit tests that should run without alma archive code to create a different implementation of BlobberPlugin
.
References alma.acs.component.ComponentImplBase.m_containerServices.
Referenced by alma.acs.monitoring.blobber.BlobberImpl.initialize().
BlobberWorker alma.acs.monitoring.blobber.BlobberImpl.createWorker | ( | BlobberPlugin | blobberPlugin | ) | throws AcsJCouldntCreateObjectEx [protected] |
Factored out from initialize(ContainerServices) for testing with mock BlobberWorker
AcsJCouldntCreateObjectEx |
References alma.acs.monitoring.blobber.BlobberImpl.blobberPlugin, and alma.acs.component.ComponentImplBase.m_containerServices.
Referenced by alma.acs.monitoring.blobber.BlobberImpl.initialize().
void alma.acs.monitoring.blobber.BlobberImpl.execute | ( | ) |
Repeatedly runs the blobber worker code in a separate thread (every 60 seconds). If any execution of the blobber worker takes longer than 60 s, then subsequent executions may start late, but will not concurrently execute.
References alma.acs.monitoring.blobber.BlobberImpl.blobberLoopRunner, alma.acs.monitoring.blobber.BlobberImpl.collectorIntervalSec, alma.acs.container.ContainerServicesBase.getThreadFactory(), alma.acs.component.ComponentImplBase.m_containerServices, alma.acs.component.ComponentImplBase.m_logger, alma.acs.monitoring.blobber.BlobberImpl.myWorker, alma.acs.concurrent.ThreadLoopRunner.runLoop(), and alma.acs.concurrent.ThreadLoopRunner.setDelayMode().
void alma.acs.monitoring.blobber.BlobberImpl.initialize | ( | ContainerServices | inContainerServices | ) | throws ComponentLifecycleException |
Initializes the component: creates the BlobberPlugin and the BlobberWorker objects.
Raises an alarm (FF="Monitoring", FM="MonitorArchiver", FC="2") if initialization fails. This makes sense because the blobber runs as an autostart component, and the manager being the client that activates this blobber would not know the alarm details. : Shouldn't we use a FM specific to this blobber instance?
References alma.acs.monitoring.blobber.BlobberImpl.blobberPlugin, alma.acs.monitoring.blobber.BlobberImpl.collectorIntervalSec, alma.acs.monitoring.blobber.BlobberImpl.createBlobberPlugin(), alma.acs.monitoring.blobber.BlobberImpl.createWorker(), alma.acs.monitoring.blobber.BlobberPlugin.getCollectorIntervalSec(), alma.acs.component.ComponentImplBase.m_containerServices, alma.acs.component.ComponentImplBase.m_logger, alma.acs.monitoring.blobber.BlobberImpl.myWorker, alma.acs.component.ComponentImplBase.name(), and alma.acs.container.ContainerServices.releaseComponent().
CollectorListStatus alma.acs.monitoring.blobber.BlobberImpl.removeCollector | ( | String | inComponentName | ) |
We use this convenience class from ACS to execute the blobber code at fixed intervals.
Referenced by alma.acs.monitoring.blobber.BlobberImpl.cleanUp(), and alma.acs.monitoring.blobber.BlobberImpl.execute().
int alma.acs.monitoring.blobber.BlobberImpl.collectorIntervalSec [protected] |
Default interval between collecting data.
Referenced by alma.acs.monitoring.blobber.BlobberImpl.execute(), and alma.acs.monitoring.blobber.BlobberImpl.initialize().
The code that gets run at fixed time intervals.
Referenced by alma.acs.monitoring.blobber.BlobberImpl.addCollector(), alma.acs.monitoring.blobber.BlobberImpl.containsCollector(), alma.acs.monitoring.blobber.BlobberImpl.execute(), alma.acs.monitoring.blobber.BlobberImpl.initialize(), and alma.acs.monitoring.blobber.BlobberImpl.removeCollector().