Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.measurement.server.session
Class AvailabilityManagerEJBImpl

    java.lang.Object
      org.hyperic.hq.measurement.server.session.SessionEJB
          org.hyperic.hq.measurement.server.session.AvailabilityManagerEJBImpl

All Implemented Interfaces:
  java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

    public class AvailabilityManagerEJBImpl

extends SessionEJB
implements javax.ejb.SessionBean

The AvailabityManagerEJBImpl class is a stateless session bean that can be used to retrieve Availability Data RLE points

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.hyperic.hq.measurement.server.session.SessionEJB
`_mpm, DATASOURCE_NAME`

Constructor Summary
`AvailabilityManagerEJBImpl()`

Method Summary
`void` | `addData(java.lang.Integer mid, MetricValue mval)` Add a single Availablility Data point.
`void` | `addData(java.util.List availPoints)` Process Availability data.
`void` | `addData(java.util.List availPoints, boolean sendData)` Process Availability data.
`void` | `ejbActivate()`
`void` | `ejbCreate()`
`void` | `ejbPassivate()`
`void` | `ejbPostCreate()`
`void` | `ejbRemove()`
`java.util.Map` | `getAggregateData(java.lang.Integer[] tids, java.lang.Integer[] iids, long begin, long end)`
`java.util.Map` | `getAggregateData(java.lang.Integer[] mids, long begin, long end)`
`java.util.Map` | `getAggregateDataByTemplate(java.lang.Integer[] mids, long begin, long end)`
`java.util.List` | `getAllAvailIds()`
`Measurement` | `getAvailMeasurement(Resource resource)`
`java.util.Map` | `getAvailMeasurementChildren(java.util.List resourceIds, java.lang.String resourceRelationType)`
`java.util.List` | `getAvailMeasurementChildren(Resource resource, java.lang.String resourceRelationType)`
`java.util.Map` | `getAvailMeasurementParent(java.util.List resourceIds, java.lang.String resourceRelationType)`
`java.util.List` | `getAvailMeasurementParent(Resource resource, java.lang.String resourceRelationType)`
`long` | `getDowntime(Resource resource, long begin, long end)`
`PageList` | `getHistoricalAvailData(java.lang.Integer[] mids, long begin, long end, long interval, PageControl pc, boolean prependUnknowns)` Fetches historical availability encapsulating the specified time range for each measurement id in mids;
`PageList` | `getHistoricalAvailData(Measurement m, long begin, long end, PageControl pc, boolean prependUnknowns)` TODO: Can this method be combined with the one that takes an array?
`java.util.List` | `getHistoricalAvailData(Resource res, long begin, long end)` Get the list of Raw RLE objects for a resource
`java.util.Map` | `getLastAvail(java.util.Collection resources, java.util.Map measCache)`
`java.util.Map` | `getLastAvail(java.lang.Integer[] mids)` Only unique measurement ids should be passed in.
`MetricValue` | `getLastAvail(Measurement m)`
`static org.hyperic.hq.measurement.shared.AvailabilityManagerLocal` | `getOne()`
`java.util.List` | `getPlatformResources()`
`java.util.List` | `getUnavailEntities(java.util.List includes)`
`void` | `sendDataToEventHandlers(java.util.Map data)` This method should only be called by the AvailabilityCheckService and is used to filter availability data points based on hierarchical alerting rules.
`void` | `setSessionContext(javax.ejb.SessionContext ctx)`

Methods inherited from class org.hyperic.hq.measurement.server.session.SessionEJB
`checkDeletePermission, checkModifyPermission, checkTimeArguments, deleteMetricProblems, getAgent, getAgent, getAgentMan, getAuthzSubjectManager, getAvailabilityDataDAO, getBaselineDAO, getCategoryDAO, getDataMan, getInitialContext, getMeasurementDAO, getMeasurementTemplateDAO, getMetricProblemDAO, getMonitorableTypeDAO, getMPM, getProductMan, getResource, getScheduleRevNumDAO, getSRNManager, getTemplateMan`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AvailabilityManagerEJBImpl

    public AvailabilityManagerEJBImpl()

Method Detail

### getAvailMeasurement

    public Measurement getAvailMeasurement(Resource resource)

### getPlatformResources

    public java.util.List getPlatformResources()

### getDowntime

    public long getDowntime(Resource resource,
                            long begin,
                            long end)
                     throws MeasurementNotFoundException

  Returns:
    Down time in ms for the Resource availability
  Throws:
    `MeasurementNotFoundException`

### getAllAvailIds

    public java.util.List getAllAvailIds()

  Returns:
    List of all measurement ids for availability, ordered

### getAvailMeasurementChildren

    public java.util.List getAvailMeasurementChildren(Resource resource,
                                                      java.lang.String resourceRelationType)

### getAvailMeasurementChildren

    public java.util.Map getAvailMeasurementChildren(java.util.List resourceIds,
                                                     java.lang.String resourceRelationType)

  Parameters:
    `{@link` - List} of `Integer` resource ids
  Returns:
    `Map` of `Integer` to `List` of `Measurement`

### getAvailMeasurementParent

    public java.util.List getAvailMeasurementParent(Resource resource,
                                                    java.lang.String resourceRelationType)

### getAvailMeasurementParent

    public java.util.Map getAvailMeasurementParent(java.util.List resourceIds,
                                                   java.lang.String resourceRelationType)

### getHistoricalAvailData

    public PageList getHistoricalAvailData(Measurement m,
                                           long begin,
                                           long end,
                                           PageControl pc,
                                           boolean prependUnknowns)

  TODO: Can this method be combined with the one that takes an array?

### getHistoricalAvailData

    public PageList getHistoricalAvailData(java.lang.Integer[] mids,
                                           long begin,
                                           long end,
                                           long interval,
                                           PageControl pc,
                                           boolean prependUnknowns)

  Fetches historical availability encapsulating the specified time range for each measurement id in mids;

  Parameters:
    `mids` - measurement ids
    `begin` - time range start
    `end` - time range end
    `interval` - interval of each time range window
    `pc` - page control
    `prependUnknowns` - determines whether to prepend AVAIL_UNKNOWN if the corresponding time window is not accounted for in the database. Since availability is contiguous this will not occur unless the time range precedes the first availability point.
  See Also:
    `MeasurementConstants.AVAIL_UNKNOWN`

### getHistoricalAvailData

    public java.util.List getHistoricalAvailData(Resource res,
                                                 long begin,
                                                 long end)

  Get the list of Raw RLE objects for a resource

  Returns:
    List

### getAggregateData

    public java.util.Map getAggregateData(java.lang.Integer[] mids,
                                          long begin,
                                          long end)

  Returns:
    `Map` of `Measurement` to `double[]`. Array is comprised of 5 elements: [IND_MIN] [IND_AVG] [IND_MAX] [IND_CFG_COUNT] [IND_LAST_TIME]

### getAggregateDataByTemplate

    public java.util.Map getAggregateDataByTemplate(java.lang.Integer[] mids,
                                                    long begin,
                                                    long end)

  Returns:
    `Map` of `MeasurementTemplate.getId` to `double[]`. Array is comprised of 5 elements: [IND_MIN] [IND_AVG] [IND_MAX] [IND_CFG_COUNT] [IND_LAST_TIME]

### getAggregateData

    public java.util.Map getAggregateData(java.lang.Integer[] tids,
                                          java.lang.Integer[] iids,
                                          long begin,
                                          long end)

  Returns:
    `Map` of `MeasurementTemplate.getId` to `double[]`. Array is comprised of 5 elements: [IND_MIN] [IND_AVG] [IND_MAX] [IND_CFG_COUNT] [IND_LAST_TIME]

### getLastAvail

    public java.util.Map getLastAvail(java.util.Collection resources,
                                      java.util.Map measCache)

  Parameters:
    `resources` - Collection may be of type `Resource`, `AppdefEntityId`, `AppdefEntityValue`, `AppdefResourceValue` or `Integer`
    `measCache` - Map optional arg (may be null) to supply measurement id(s) of ResourceIds. Integer => Resource.getId(). If a measurement is not specified in the measCache parameter it will be added to the map
  Returns:
    Map Integer => Measurement.getId()

### getLastAvail

    public MetricValue getLastAvail(Measurement m)

### getLastAvail

    public java.util.Map getLastAvail(java.lang.Integer[] mids)

  Only unique measurement ids should be passed in. Duplicate measurement ids will be filtered out from the returned Map if present.

  Returns:
    `Map` of `Integer` to `MetricValue` Integer is the measurementId

### getUnavailEntities

    public java.util.List getUnavailEntities(java.util.List includes)

  Parameters:
    `includes` - List of mids. If includes is null then all unavail entities will be returned.

### addData

    public void addData(java.lang.Integer mid,
                        MetricValue mval)

  Add a single Availablility Data point.

### addData

    public void addData(java.util.List availPoints)

  Process Availability data. The default behavior is to send the data points to the event handlers.

  Parameters:
    `availPoints` - List of DataPoints

### addData

    public void addData(java.util.List availPoints,
                        boolean sendData)

  Process Availability data.

  Parameters:
    `availPoints` - List of DataPoints
    `sendData` - Indicates whether to send the data to event handlers. The default behavior is true. If false, the calling method should call sendDataToEventHandlers directly afterwards.

### sendDataToEventHandlers

    public void sendDataToEventHandlers(java.util.Map data)

  This method should only be called by the AvailabilityCheckService and is used to filter availability data points based on hierarchical alerting rules.

### getOne

    public static org.hyperic.hq.measurement.shared.AvailabilityManagerLocal getOne()

### ejbCreate

    public void ejbCreate()

### ejbPostCreate

    public void ejbPostCreate()

### ejbActivate

    public void ejbActivate()

  Specified by:
    `ejbActivate` in interface `javax.ejb.SessionBean`

### ejbPassivate

    public void ejbPassivate()

  Specified by:
    `ejbPassivate` in interface `javax.ejb.SessionBean`

### ejbRemove

    public void ejbRemove()

  Specified by:
    `ejbRemove` in interface `javax.ejb.SessionBean`

### setSessionContext

    public void setSessionContext(javax.ejb.SessionContext ctx)

  Specified by:
    `setSessionContext` in interface `javax.ejb.SessionBean`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.