Inherits alma::acs::concurrent::ThreadLoopRunner::CancelableRunnable.
Classes | |
class | AnyDataContainer |
class | DebugDataSender |
Public Member Functions | |
BlobberWorker (ContainerServices inContainerServices, BlobberPlugin blobberPlugin) throws AcsJCouldntCreateObjectEx | |
CollectorListStatus | addCollector (String inCollectorComponentId) |
CollectorListStatus | removeCollector (String inCollectorComponentId) |
CollectorListStatus | containsCollector (String inCollectorComponentId) |
void | run () |
Static Public Attributes | |
static final String | BLOBBER_CHECK_JVM_MEMORY_PROPERTYNAME = "alma.acs.monitoring.blobber.checkmemory" |
Protected Member Functions | |
void | initWorker () |
int | getMaxCollectorCount () |
void | setMaxCollectorCount (int inCount) |
boolean | canHandle () |
MonitorCollectorOperations | getMonitorCollector (String inCollectorName) throws AcsJContainerServicesEx |
void | storeData (BlobData inBlobData) throws Exception |
Protected Attributes | |
List< MonitorDAO > | myMonitorDAOList |
ContainerServices | myContainerServices |
Logger | myLogger |
long | collectIntervalSec |
Package Functions | |
void | notifyCollectorIntervalChange (long inCollectIntervalSec) |
The part of the blobber component that does the real work. It implements Runnable to allow running it repeatedly in a separate thread.
alma.acs.monitoring.blobber.BlobberWorker.BlobberWorker | ( | ContainerServices | inContainerServices, | |
BlobberPlugin | blobberPlugin | |||
) | throws AcsJCouldntCreateObjectEx |
inContainerServices | used for logging and to get references to the collector components. | |
blobberPlugin |
AcsJCouldntCreateObjectEx | If blobberPlugin.createMonitorDAO fails. |
References alma.acs.container.ContainerServicesBase.getLogger(), alma.acs.monitoring.blobber.BlobberWorker.initWorker(), alma.acs.monitoring.blobber.BlobberWorker.myContainerServices, alma.acs.monitoring.blobber.BlobberWorker.myLogger, alma.acs.monitoring.blobber.BlobberWorker.myMonitorDAOList, and alma.acs.monitoring.blobber.BlobberWorker.notifyCollectorIntervalChange().
CollectorListStatus alma.acs.monitoring.blobber.BlobberWorker.addCollector | ( | String | inCollectorComponentId | ) |
Adds the collector component of the given name to the blobber. If the collector is already known to the blobber it will not be added again.
HSO TODO: what is meant by the following description? I don't see any of this in the code.
This method will however NOT wait for this, it returns immediately with one exception. When the second collector is added it is first ensured that one access has completed to the firstly added collector in order to wait for the access statistics needed to calculate the capacity of the blobber.
inCollectorComponentId | a String stating the name of the collector to add. |
References alma.acs.monitoring.blobber.CollectorList.add(), alma.acs.monitoring.blobber.BlobberWorker.canHandle(), and alma.acs.monitoring.blobber.BlobberWorker.myLogger.
Referenced by alma.acs.monitoring.blobber.BlobberImpl.addCollector().
boolean alma.acs.monitoring.blobber.BlobberWorker.canHandle | ( | ) | [protected] |
CollectorListStatus alma.acs.monitoring.blobber.BlobberWorker.containsCollector | ( | String | inCollectorComponentId | ) |
Checks if the collector list contains the stated collector.
inCollectorComponentId | a String stating the name of the collector to look for. |
References alma.acs.monitoring.blobber.CollectorList.contains().
Referenced by alma.acs.monitoring.blobber.BlobberImpl.containsCollector().
int alma.acs.monitoring.blobber.BlobberWorker.getMaxCollectorCount | ( | ) | [protected] |
Referenced by alma.acs.monitoring.blobber.BlobberWorker.canHandle().
MonitorCollectorOperations alma.acs.monitoring.blobber.BlobberWorker.getMonitorCollector | ( | String | inCollectorName | ) | throws AcsJContainerServicesEx [protected] |
Gets the reference of the MonitorCollector component that is identified by its name inCollectorName
which could for example be "CONTROL/CM01/MONITOR_COLLECTOR".
Collector references are cached in collectorName2ComponentReference across blobber cycles.
References alma.acs.container.ContainerServices.getComponent(), alma.acs.monitoring.blobber.BlobberWorker.myContainerServices, and alma.acs.monitoring.blobber.BlobberWorker.myLogger.
Referenced by alma.acs.monitoring.blobber.BlobberWorker.run().
void alma.acs.monitoring.blobber.BlobberWorker.initWorker | ( | ) | [protected] |
void alma.acs.monitoring.blobber.BlobberWorker.notifyCollectorIntervalChange | ( | long | inCollectIntervalSec | ) | [package] |
References alma.acs.monitoring.blobber.BlobberWorker.collectIntervalSec.
Referenced by alma.acs.monitoring.blobber.BlobberWorker.BlobberWorker().
CollectorListStatus alma.acs.monitoring.blobber.BlobberWorker.removeCollector | ( | String | inCollectorComponentId | ) |
Removes the stated collector from the blobber. If the worker is currently working with the specified collector it will finish the operation. This method will however NOT wait for the operation, it returns immediately.
inCollectorComponentId | a String stating the name of the collector to remove. |
References alma.acs.monitoring.blobber.BlobberWorker.myLogger, and alma.acs.monitoring.blobber.CollectorList.remove().
Referenced by alma.acs.monitoring.blobber.BlobberImpl.removeCollector().
void alma.acs.monitoring.blobber.BlobberWorker.run | ( | ) |
This method will be called at fixed intervals. It gathers the data from all registered collectors and stores it in the database, using the layer from module TMCBD/DAO.
References alma.acs.monitoring.blobber.BlobberWorker.BLOBBER_CHECK_JVM_MEMORY_PROPERTYNAME, alma.acs.monitoring.blobber.BlobberWorker.collectIntervalSec, alma.acs.util.StopWatch.getLapTimeMillis(), alma.acs.monitoring.blobber.BlobberWorker.getMonitorCollector(), alma.acs.monitoring.blobber.CollectorList.hasNext(), alma.acs.util.StopWatch.logLapTime(), alma.acs.monitoring.blobber.BlobberWorker.myLogger, alma.acs.monitoring.blobber.CollectorList.next(), and alma.acs.monitoring.blobber.CollectorList.resetIterator().
void alma.acs.monitoring.blobber.BlobberWorker.setMaxCollectorCount | ( | int | inCount | ) | [protected] |
void alma.acs.monitoring.blobber.BlobberWorker.storeData | ( | BlobData | inBlobData | ) | throws Exception [protected] |
Stores the data using the MonitorDAO layer.
References alma.acs.monitoring.blobber.BlobberWorker.myLogger.
final String alma.acs.monitoring.blobber.BlobberWorker.BLOBBER_CHECK_JVM_MEMORY_PROPERTYNAME = "alma.acs.monitoring.blobber.checkmemory" [static] |
Referenced by alma.acs.monitoring.blobber.BlobberWorker.run().
long alma.acs.monitoring.blobber.BlobberWorker.collectIntervalSec [protected] |
The interval between blobber cycles, each harvesting all collectors. This is used only for logging, since the cycle gets triggered from outside of this class.
Referenced by alma.acs.monitoring.blobber.BlobberWorker.notifyCollectorIntervalChange(), and alma.acs.monitoring.blobber.BlobberWorker.run().
Logger alma.acs.monitoring.blobber.BlobberWorker.myLogger [protected] |
Referenced by alma.acs.monitoring.blobber.BlobberWorker.addCollector(), alma.acs.monitoring.blobber.BlobberWorker.BlobberWorker(), alma.acs.monitoring.blobber.BlobberWorker.getMonitorCollector(), alma.acs.monitoring.blobber.BlobberWorker.initWorker(), alma.acs.monitoring.blobber.BlobberWorker.removeCollector(), alma.acs.monitoring.blobber.BlobberWorker.run(), and alma.acs.monitoring.blobber.BlobberWorker.storeData().
List<MonitorDAO> alma.acs.monitoring.blobber.BlobberWorker.myMonitorDAOList [protected] |
Stores the data in the DB, inside proper transaction(s), and performing auto-completion of hardware tables if necessary.
Referenced by alma.acs.monitoring.blobber.BlobberWorker.BlobberWorker().