Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.measurement.server.session
Class SRNManagerEJBImpl

java.lang.Object
  extended by org.hyperic.hq.measurement.server.session.SessionEJB
      extended by org.hyperic.hq.measurement.server.session.SRNManagerEJBImpl
All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class SRNManagerEJBImpl
extends SessionEJB
implements javax.ejb.SessionBean

The tracker manager handles sending agents add and remove operations for the log and config track plugsin.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.hyperic.hq.measurement.server.session.SessionEJB
_mpm, DATASOURCE_NAME
 
Constructor Summary
SRNManagerEJBImpl()
           
 
Method Summary
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbPostCreate()
           
 void ejbRemove()
           
 ScheduleRevNum get(AppdefEntityID aid)
          Get a SRN
static org.hyperic.hq.measurement.shared.SRNManagerLocal getOne()
           
 java.util.List getOutOfSyncEntities()
          Get a List of out-of-sync entities.
 java.util.List getOutOfSyncSRNs(int intervals)
          Get the list of out-of-sync SRNs based on the number of intervals back to allow.
 int incrementSrn(AppdefEntityID aid, long newMin)
          Increment SRN for the given entity.
 void initializeCache()
          Initialize the SRN Cache, or just return if it's already been initialized.
 ScheduleRevNum refreshSRN(AppdefEntityID eid)
          Refresh the SRN for the given entity.
 void removeSrn(AppdefEntityID aid)
          Remove a SRN.
 java.util.Collection reportAgentSRNs(SRN[] srns)
          Handle a SRN report from an agent.
 void reschedule(java.util.List aeids)
          Reschedule metrics for an appdef entity.
 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

SRNManagerEJBImpl

public SRNManagerEJBImpl()
Method Detail

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

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

initializeCache

public void initializeCache()
Initialize the SRN Cache, or just return if it's already been initialized.


get

public ScheduleRevNum get(AppdefEntityID aid)
Get a SRN

Parameters:
aid - The entity id to lookup
Returns:
The SRN for the given entity

removeSrn

public void removeSrn(AppdefEntityID aid)
Remove a SRN.

Parameters:
aid - The AppdefEntityID to remove.

incrementSrn

public int incrementSrn(AppdefEntityID aid,
                        long newMin)
Increment SRN for the given entity.

Parameters:
aid - The AppdefEntityID to remove.
newMin - The new minimum interval
Returns:
The ScheduleRevNum for the given entity id

reportAgentSRNs

public java.util.Collection reportAgentSRNs(SRN[] srns)
Handle a SRN report from an agent.

Parameters:
srns - The list of SRNs from the agent report.
Returns:
A Collection of ScheduleRevNum objects that do not have a corresponding appdef entity. (i.e. Out of sync)

getOutOfSyncEntities

public java.util.List getOutOfSyncEntities()
Get a List of out-of-sync entities.

Returns:
A list of ScheduleReNum objects that are out of sync.

getOutOfSyncSRNs

public java.util.List getOutOfSyncSRNs(int intervals)
Get the list of out-of-sync SRNs based on the number of intervals back to allow.

Parameters:
intervals - The number of intervals to go back
Returns:
A List of ScheduleRevNum objects.

refreshSRN

public ScheduleRevNum refreshSRN(AppdefEntityID eid)
Refresh the SRN for the given entity.

Parameters:
eid - The appdef entity to refresh
Returns:
The new ScheduleRevNum object.

reschedule

public void reschedule(java.util.List aeids)
                throws MeasurementScheduleException,
                       MonitorAgentException,
                       MeasurementUnscheduleException
Reschedule metrics for an appdef entity. Generally should only be called from the AgentScheduleSynchronizer

Parameters:
List - of AppdefEntityId
Throws:
MeasurementScheduleException
MonitorAgentException
MeasurementUnscheduleException

getOne

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

Hyperic HQ Plugin API v. 4.4.0.2

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