org.rhq.core.domain.measurement.oob
Class MeasurementOutOfBounds

java.lang.Object
  extended by org.rhq.core.domain.measurement.oob.MeasurementOutOfBounds
All Implemented Interfaces:
Serializable

public class MeasurementOutOfBounds
extends Object
implements Serializable

An indicator that a measurement has gone out of bounds (OOB) and by how much.

See Also:
Serialized Form

Field Summary
static String QUERY_COUNT_FOR_SCHEDULE_IDS_ADMIN
           
static String QUERY_DELETE_BY_RESOURCES
           
static String QUERY_DELETE_BY_TIME
           
static String QUERY_FIND_ALL
           
static String QUERY_FIND_ALL_ADMIN
           
static String QUERY_FIND_BY_ID_AND_LOAD
           
static String QUERY_FIND_FOR_DEFINITION_AND_RESOURCEIDS_ADMIN
           
static String QUERY_FIND_FOR_RESOURCE
           
static String QUERY_FIND_FOR_RESOURCE_ADMIN
           
static String QUERY_FIND_FOR_SCHEDULE
           
static String QUERY_FIND_FOR_SCHEDULE_ADMIN
           
 
Constructor Summary
protected MeasurementOutOfBounds()
           
  MeasurementOutOfBounds(MeasurementSchedule schedule, long occurred, double diff)
           
 
Method Summary
 boolean equals(Object obj)
           
 double getDiff()
          Returns the difference between the baseline and the actual measured value.
 int getId()
           
 long getOccurred()
          Returns the time (in epoch milliseconds) when a measurement was detected to have gone out-of-bounds from its baseline.
 MeasurementSchedule getSchedule()
           
 int hashCode()
           
 void setDiff(double diff)
           
 void setId(int id)
           
 void setOccurred(long occurred)
           
 void setSchedule(MeasurementSchedule schedule)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

QUERY_FIND_BY_ID_AND_LOAD

public static final String QUERY_FIND_BY_ID_AND_LOAD
See Also:
Constant Field Values

QUERY_FIND_ALL_ADMIN

public static final String QUERY_FIND_ALL_ADMIN
See Also:
Constant Field Values

QUERY_FIND_ALL

public static final String QUERY_FIND_ALL
See Also:
Constant Field Values

QUERY_FIND_FOR_RESOURCE_ADMIN

public static final String QUERY_FIND_FOR_RESOURCE_ADMIN
See Also:
Constant Field Values

QUERY_FIND_FOR_RESOURCE

public static final String QUERY_FIND_FOR_RESOURCE
See Also:
Constant Field Values

QUERY_FIND_FOR_SCHEDULE_ADMIN

public static final String QUERY_FIND_FOR_SCHEDULE_ADMIN
See Also:
Constant Field Values

QUERY_FIND_FOR_SCHEDULE

public static final String QUERY_FIND_FOR_SCHEDULE
See Also:
Constant Field Values

QUERY_FIND_FOR_DEFINITION_AND_RESOURCEIDS_ADMIN

public static final String QUERY_FIND_FOR_DEFINITION_AND_RESOURCEIDS_ADMIN
See Also:
Constant Field Values

QUERY_COUNT_FOR_SCHEDULE_IDS_ADMIN

public static final String QUERY_COUNT_FOR_SCHEDULE_IDS_ADMIN
See Also:
Constant Field Values

QUERY_DELETE_BY_RESOURCES

public static final String QUERY_DELETE_BY_RESOURCES
See Also:
Constant Field Values

QUERY_DELETE_BY_TIME

public static final String QUERY_DELETE_BY_TIME
See Also:
Constant Field Values
Constructor Detail

MeasurementOutOfBounds

protected MeasurementOutOfBounds()

MeasurementOutOfBounds

public MeasurementOutOfBounds(MeasurementSchedule schedule,
                              long occurred,
                              double diff)
Method Detail

getId

public int getId()

setId

public void setId(int id)

getSchedule

public MeasurementSchedule getSchedule()

setSchedule

public void setSchedule(MeasurementSchedule schedule)

getOccurred

public long getOccurred()
Returns the time (in epoch milliseconds) when a measurement was detected to have gone out-of-bounds from its baseline.

Returns:
epoch milliseconds of when the out-of-bounds occurred

setOccurred

public void setOccurred(long occurred)

getDiff

public double getDiff()
Returns the difference between the baseline and the actual measured value. If this returned value is greater than 0, the measured value exceeded the maximum baseline; if less than 0, the measured value dipped below the minimum baseline.

Returns:
the difference between the measured value and the baseline.

setDiff

public void setDiff(double diff)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008 RHQ Project Advisory Board (Red Hat, Inc. and Hyperic, Inc.). All Rights Reserved.