public class BlobberImpl extends ComponentImplBase
| Modifier and Type | Field and Description |
|---|---|
protected AlarmSource |
alarmSource |
protected ThreadLoopRunner |
blobberLoopRunner
We use this convenience class from ACS to execute the blobber code at fixed intervals.
|
protected BlobberPlugin |
blobberPlugin |
protected int |
collectorIntervalSec
Default interval between collecting data.
|
protected long |
componentActivationStartNanos
Similar to
componentActivationTimesNanosMap, but used to compute the total component activation. |
protected java.util.Map<java.lang.String,java.lang.Long> |
componentActivationTimesNanosMap
There have been problems with slow blobber activation (http://ictjira.alma.cl/browse/ICT-462).
|
protected BlobberWorker |
myWorker
The code that gets run at fixed time intervals.
|
m_containerServices, m_instanceName, m_logger| Constructor and Description |
|---|
BlobberImpl() |
| Modifier and Type | Method and Description |
|---|---|
CollectorListStatus |
addCollector(java.lang.String inComponentName) |
void |
cleanUp()
Stops the blobber loop, but does not forcibly stop the running blobber.
|
CollectorListStatus |
containsCollector(java.lang.String inComponentName) |
protected BlobberPlugin |
createBlobberPlugin()
Creates (using reflection) an instance of
alma.acs.monitoring.blobber.BlobberPluginAlmaImpl
that ARCHIVE/TMCDB/ modules must provide. |
protected BlobberWorker |
createWorker()
Factored out from
initialize(ContainerServices) for testing with mock BlobberWorker |
void |
execute()
Repeatedly runs the blobber worker code in a separate thread (every 60 seconds).
|
void |
initialize(ContainerServices inContainerServices)
Initializes the component: creates the BlobberPlugin and the BlobberWorker objects.
|
protected void |
logComponentActivationTimes()
Creates an INFO log from the times collected in
componentActivationTimesNanosMap
and then nulls that map. |
CollectorListStatus |
removeCollector(java.lang.String inComponentName) |
aboutToAbort, componentState, nameprotected BlobberWorker myWorker
protected int collectorIntervalSec
BlobberPlugin.getCollectorIntervalSec()protected ThreadLoopRunner blobberLoopRunner
protected BlobberPlugin blobberPlugin
protected AlarmSource alarmSource
protected java.util.Map<java.lang.String,java.lang.Long> componentActivationTimesNanosMap
execute().logComponentActivationTimes()protected long componentActivationStartNanos
componentActivationTimesNanosMap, but used to compute the total component activation.public void initialize(ContainerServices inContainerServices) throws ComponentLifecycleException
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.
initialize in interface ComponentLifecycleinitialize in class ComponentImplBaseinContainerServices - callback object for services provided by the containerComponentLifecycleExceptionComponentImplBase.initialize(alma.acs.container.ContainerServices)protected BlobberPlugin createBlobberPlugin() throws AcsJCouldntCreateObjectEx
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.
AcsJCouldntCreateObjectExprotected BlobberWorker createWorker() throws AcsJCouldntCreateObjectEx
initialize(ContainerServices) for testing with mock BlobberWorkerAcsJCouldntCreateObjectExpublic void execute()
execute in interface ComponentLifecycleexecute in class ComponentImplBaseComponentImplBase.execute()protected void logComponentActivationTimes()
componentActivationTimesNanosMap
and then nulls that map.public void cleanUp()
cleanUp in interface ComponentLifecyclecleanUp in class ComponentImplBaseComponentImplBase.cleanUp()public CollectorListStatus addCollector(java.lang.String inComponentName)
public CollectorListStatus containsCollector(java.lang.String inComponentName)
public CollectorListStatus removeCollector(java.lang.String inComponentName)