public class BlobberWorker extends ThreadLoopRunner.CancelableRunnable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BLOBBER_CHECK_JVM_MEMORY_PROPERTYNAME |
protected long |
collectIntervalSec
The interval between blobber cycles, each harvesting all collectors.
|
protected ContainerServices |
myContainerServices |
protected java.util.logging.Logger |
myLogger |
protected java.util.List<MonitorDAO> |
myMonitorDAOList
DAOs store the data in the DB or on file, inside proper transaction(s) and performing auto-completion of hardware tables if necessary.
|
shouldTerminate| Constructor and Description |
|---|
BlobberWorker(ContainerServices inContainerServices,
BlobberPlugin blobberPlugin) |
| Modifier and Type | Method and Description |
|---|---|
CollectorListStatus |
addCollector(java.lang.String inCollectorComponentId)
Adds the collector component of the given name to the blobber.
|
protected boolean |
canHandle() |
CollectorListStatus |
containsCollector(java.lang.String inCollectorComponentId)
Checks if the collector list contains the stated collector.
|
protected int |
getMaxCollectorCount() |
protected MonitorCollectorOperations |
getMonitorCollector(java.lang.String inCollectorName)
Gets the reference of the
MonitorCollector component that is identified by its name
inCollectorName which could for example be "CONTROL/CM01/MONITOR_COLLECTOR". |
protected void |
initWorker() |
CollectorListStatus |
removeCollector(java.lang.String inCollectorComponentId)
Removes the stated collector from the blobber.
|
void |
run()
This method will be called at fixed intervals.
|
protected void |
setMaxCollectorCount(int inCount) |
protected void |
storeData(BlobData inBlobData)
Stores the data using the MonitorPointExpertImpl layer.
|
cancelpublic static final java.lang.String BLOBBER_CHECK_JVM_MEMORY_PROPERTYNAME
protected java.util.List<MonitorDAO> myMonitorDAOList
protected ContainerServices myContainerServices
protected java.util.logging.Logger myLogger
protected long collectIntervalSec
public 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.protected void initWorker()
protected int getMaxCollectorCount()
protected void setMaxCollectorCount(int inCount)
public CollectorListStatus addCollector(java.lang.String inCollectorComponentId)
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.CollectorListStatus#ADDED,
CollectorListStatus#KNOWN or
CollectorListStatus#FULL.protected boolean canHandle()
public CollectorListStatus removeCollector(java.lang.String inCollectorComponentId)
inCollectorComponentId - a String stating the name of the collector to remove.CollectorListStatus#UNKNOWN or
CollectorListStatus#REMOVED.public CollectorListStatus containsCollector(java.lang.String inCollectorComponentId)
inCollectorComponentId - a String stating the name of the collector to look for.CollectorListStatus#KNOWN or
CollectorListStatus#UNKNOWN.protected MonitorCollectorOperations getMonitorCollector(java.lang.String inCollectorName)
throws AcsJContainerServicesEx
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.
AcsJContainerServicesExpublic void run()
Runnable.run()protected void storeData(BlobData inBlobData) throws java.lang.Exception
java.lang.Exception