Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Package Functions

alma.acs.monitoring.blobber.BlobberWorker Class Reference

Inherits alma::acs::concurrent::ThreadLoopRunner::CancelableRunnable.

List of all members.

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< MonitorDAOmyMonitorDAOList
ContainerServices myContainerServices
Logger myLogger
long collectIntervalSec

Package Functions

void notifyCollectorIntervalChange (long inCollectIntervalSec)

Detailed Description

The part of the blobber component that does the real work. It implements Runnable to allow running it repeatedly in a separate thread.


Constructor & Destructor Documentation

alma.acs.monitoring.blobber.BlobberWorker.BlobberWorker ( ContainerServices  inContainerServices,
BlobberPlugin  blobberPlugin 
) throws AcsJCouldntCreateObjectEx

Member Function Documentation

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.

Parameters:
inCollectorComponentId a String stating the name of the collector to add.
Returns:
a CollectorListStatus stating the result. Values to expect are CollectorListStatus#ADDED, CollectorListStatus#KNOWN or CollectorListStatus#FULL.

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.

Parameters:
inCollectorComponentId a String stating the name of the collector to look for.
Returns:
a CollectorListStatus stating the result. Values to expect are CollectorListStatus#KNOWN or CollectorListStatus#UNKNOWN.

References alma.acs.monitoring.blobber.CollectorList.contains().

Referenced by alma.acs.monitoring.blobber.BlobberImpl.containsCollector().

int alma.acs.monitoring.blobber.BlobberWorker.getMaxCollectorCount (  )  [protected]
Returns:
The maximum number of collectors that this blobber is allowed to have.

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]
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.

Parameters:
inCollectorComponentId a String stating the name of the collector to remove.
Returns:
a CollectorListStatus stating the result. Values to expect are CollectorListStatus#UNKNOWN or CollectorListStatus#REMOVED.

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 (  ) 
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.


Member Data Documentation

final String alma.acs.monitoring.blobber.BlobberWorker.BLOBBER_CHECK_JVM_MEMORY_PROPERTYNAME = "alma.acs.monitoring.blobber.checkmemory" [static]

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().

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().


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