org.rhq.core.pc.measurement
Class ScheduledMeasurementInfo

java.lang.Object
  extended by org.rhq.core.domain.measurement.MeasurementScheduleRequest
      extended by org.rhq.core.pc.measurement.ScheduledMeasurementInfo
All Implemented Interfaces:
Serializable, Comparable<ScheduledMeasurementInfo>

public class ScheduledMeasurementInfo
extends org.rhq.core.domain.measurement.MeasurementScheduleRequest
implements Comparable<ScheduledMeasurementInfo>

This is an object that has a natural ordering by when a measurement next needs to be collected as well as by its resource. Requests for the same resource that have the same measurement Implementation notes: This class has a natural ordering to it used by the measurement manager in order to track the next collection time. This ordering includes distinctive information that should be unnecessary, but is because the PriorityQueue requires that IFF a.compareTo(b) == 0 Then a.equals(b). This is unfortunate and slows us up some.

Author:
Greg Hinkle
See Also:
Serialized Form

Constructor Summary
ScheduledMeasurementInfo(org.rhq.core.domain.measurement.MeasurementScheduleRequest scheduleRequest, Integer resourceId)
           
 
Method Summary
 int compareTo(ScheduledMeasurementInfo o)
           
 boolean equals(Object o)
           
 long getLastCollection()
           
 long getNextCollection()
           
 int getResourceId()
           
 int hashCode()
           
 void setLastCollection(long lastCollection)
           
 void setNextCollection(long nextCollection)
           
 String toString()
           
 
Methods inherited from class org.rhq.core.domain.measurement.MeasurementScheduleRequest
getDataType, getInterval, getName, getRawNumericType, getScheduleId, isEnabled, isPerMinute, setEnabled, setInterval, setName, setScheduleId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScheduledMeasurementInfo

public ScheduledMeasurementInfo(org.rhq.core.domain.measurement.MeasurementScheduleRequest scheduleRequest,
                                Integer resourceId)
Method Detail

getResourceId

public int getResourceId()

getLastCollection

public long getLastCollection()

setLastCollection

public void setLastCollection(long lastCollection)

getNextCollection

public long getNextCollection()

setNextCollection

public void setNextCollection(long nextCollection)

compareTo

public int compareTo(ScheduledMeasurementInfo o)
Specified by:
compareTo in interface Comparable<ScheduledMeasurementInfo>

equals

public boolean equals(Object o)
Overrides:
equals in class org.rhq.core.domain.measurement.MeasurementScheduleRequest

hashCode

public int hashCode()
Overrides:
hashCode in class org.rhq.core.domain.measurement.MeasurementScheduleRequest

toString

public String toString()
Overrides:
toString in class org.rhq.core.domain.measurement.MeasurementScheduleRequest


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.