|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.core.pc.agent.AgentService
org.rhq.core.pc.measurement.MeasurementManager
public class MeasurementManager
Manage the scheduled process of measurement data collection, detection and sending across all plugins.
This is an agent service; its interface is made remotely accessible if this is deployed within the agent.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.rhq.core.pc.agent.AgentService |
|---|
AgentService.LifecycleState |
| Field Summary | |
|---|---|
static String |
OBJECT_NAME
|
| Constructor Summary | |
|---|---|
MeasurementManager()
|
|
| Method Summary | |
|---|---|
boolean |
checkTrait(int scheduleId,
String traitValue)
Check if the passed trait is new or has changed |
org.rhq.core.domain.measurement.MeasurementReport |
getActiveReport()
|
String |
getCachedTraitValue(int scheduleId)
If you want to get a cached value of a trait, pass in its schedule ID. |
long |
getCurrentlyScheduleMeasurements()
|
long |
getFailedCollections()
|
long |
getLateCollections()
|
Map<String,Object> |
getMeasurementScheduleInfoForResource(int resourceId)
|
long |
getMeasurementsCollected()
|
long |
getMeasurementsCollectedPerMinute()
|
long |
getNextExpectedCollectionTime()
|
Set<ScheduledMeasurementInfo> |
getNextScheduledSet()
Returns the complete set of scheduled measurement collections. |
Set<org.rhq.core.domain.measurement.MeasurementData> |
getRealTimeMeasurementValue(int resourceId,
List<org.rhq.core.domain.measurement.MeasurementDataRequest> requests)
|
long |
getTotalTimeCollectingMeasurements()
|
String |
getTraitValue(ResourceContainer container,
String traitName)
Given the name of a trait, this will find the value of that trait for the given resource. |
void |
initialize()
Initializes the container service which will effectively tell the service to start doing its work. |
void |
perMinuteItizeData(org.rhq.core.domain.measurement.MeasurementReport report)
|
void |
reschedule(Set<ScheduledMeasurementInfo> scheduledMeasurementInfos)
|
void |
scheduleCollection(int resourceId,
Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
Used to direct reschedule resources from the persisted to disk schedules |
void |
scheduleCollection(Set<org.rhq.core.domain.measurement.ResourceMeasurementScheduleRequest> scheduleRequests)
This remoted method allows the server to schedule a bunch of resources with one call. |
void |
sendMeasurementReport(org.rhq.core.domain.measurement.MeasurementReport report)
Sends the given measurement report to the server, if this plugin container has server services that it can communicate with. |
void |
setConfiguration(PluginContainerConfiguration configuration)
Informs the container service how it should be configured by providing the full plugin container configuration. |
void |
shutdown()
Stops the container service which effectively releases all runtime resources such as running threads. |
org.rhq.core.domain.measurement.MeasurementReport |
swapReport()
|
void |
unscheduleCollection(Set<Integer> resourceIds)
|
void |
updateCollection(Set<org.rhq.core.domain.measurement.ResourceMeasurementScheduleRequest> scheduleRequests)
This remoted method allows the server to schedule a bunch of resources with one call. |
| Methods inherited from class org.rhq.core.pc.agent.AgentService |
|---|
addLifecycleListener, getClientInterface, notifyLifecycleListenersOfNewState, remoteInputStream, remoteOutputStream, removeLifecycleListener, setAgentServiceStreamRemoter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String OBJECT_NAME
| Constructor Detail |
|---|
public MeasurementManager()
| Method Detail |
|---|
public void initialize()
ContainerServicenull
configuration will be set via a call to ContainerService.setConfiguration(PluginContainerConfiguration).
initialize in interface ContainerServicepublic org.rhq.core.domain.measurement.MeasurementReport getActiveReport()
public boolean checkTrait(int scheduleId,
String traitValue)
scheduleId - traitValue -
public String getCachedTraitValue(int scheduleId)
scheduleId - the schedule for the trait for a specific resource
null if not availablepublic void perMinuteItizeData(org.rhq.core.domain.measurement.MeasurementReport report)
public void shutdown()
ContainerService
shutdown in interface ContainerServicepublic void setConfiguration(PluginContainerConfiguration configuration)
ContainerServicenull configuration object so implementations of
this interface should never have to worry about a null configuration parameter value.
setConfiguration in interface ContainerServicepublic void updateCollection(Set<org.rhq.core.domain.measurement.ResourceMeasurementScheduleRequest> scheduleRequests)
MeasurementSchedules in the agent.
Use scheduleCollection(Set) if you want to replace the existing ones.
updateCollection in interface MeasurementAgentServicescheduleRequests - public void scheduleCollection(Set<org.rhq.core.domain.measurement.ResourceMeasurementScheduleRequest> scheduleRequests)
updateCollection(Set) if you want to schedule additional MeasurementSchedules
scheduleCollection in interface MeasurementAgentServicescheduleRequests -
public void scheduleCollection(int resourceId,
Set<org.rhq.core.domain.measurement.MeasurementScheduleRequest> requests)
resourceId - The resource to collect onrequests - The measurements to collectpublic void unscheduleCollection(Set<Integer> resourceIds)
unscheduleCollection in interface MeasurementAgentService
public Set<org.rhq.core.domain.measurement.MeasurementData> getRealTimeMeasurementValue(int resourceId,
List<org.rhq.core.domain.measurement.MeasurementDataRequest> requests)
getRealTimeMeasurementValue in interface MeasurementAgentServicepublic long getNextExpectedCollectionTime()
getNextExpectedCollectionTime in interface MeasurementManagerMBeanpublic Set<ScheduledMeasurementInfo> getNextScheduledSet()
public void reschedule(Set<ScheduledMeasurementInfo> scheduledMeasurementInfos)
public void sendMeasurementReport(org.rhq.core.domain.measurement.MeasurementReport report)
report - public Map<String,Object> getMeasurementScheduleInfoForResource(int resourceId)
getMeasurementScheduleInfoForResource in interface MeasurementAgentService
public String getTraitValue(ResourceContainer container,
String traitName)
resource - the resource whose trait value is to be obtainedtraitName - the name of the trait whose value is to be obtained
null if unknownpublic long getMeasurementsCollected()
getMeasurementsCollected in interface MeasurementManagerMBeanpublic long getMeasurementsCollectedPerMinute()
getMeasurementsCollectedPerMinute in interface MeasurementManagerMBeanpublic long getCurrentlyScheduleMeasurements()
getCurrentlyScheduleMeasurements in interface MeasurementManagerMBeanpublic long getTotalTimeCollectingMeasurements()
getTotalTimeCollectingMeasurements in interface MeasurementManagerMBeanpublic long getLateCollections()
getLateCollections in interface MeasurementManagerMBeanpublic org.rhq.core.domain.measurement.MeasurementReport swapReport()
public long getFailedCollections()
getFailedCollections in interface MeasurementManagerMBean
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||