|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.measurement.MeasurementScheduleManagerBean
public class MeasurementScheduleManagerBean
A manager for MeasurementSchedules.
| Constructor Summary | |
|---|---|
MeasurementScheduleManagerBean()
|
|
| Method Summary | |
|---|---|
void |
createSchedulesForExistingResources(ResourceType type,
MeasurementDefinition newDefinition)
Create MeasurementSchedules for existing resources hanging on newType. |
void |
disableAllDefaultCollections(Subject subject)
Disables all collection schedules for all measurement definitions. |
void |
disableAllSchedules(Subject subject)
Disables all collection schedules attached to all resources. |
void |
disableDefaultCollectionForMeasurementDefinitions(Subject subject,
int[] measurementDefinitionIds,
boolean updateSchedules)
Disables all collection schedules in the given measurement definition IDs. |
void |
disableMeasurementTemplates(Subject subject,
int[] measurementDefinitionIds)
|
void |
disableSchedulesForAutoGroup(Subject subject,
int parentResourceId,
int childResourceType,
int[] measurementDefinitionIds)
Disable the measurement schedules for the passed definitions of the rsource ot the passed auto group. |
void |
disableSchedulesForCompatibleGroup(Subject subject,
int groupId,
int[] measurementDefinitionIds)
Disable the measurement schedules for the passed definitions for the resources of the passed compatible group. |
void |
disableSchedulesForResource(Subject subject,
int resourceId,
int[] measurementDefinitionIds)
Disables all collection schedules attached to the given resource whose schedules are based off the given definitions. |
void |
enableMeasurementTemplates(Subject subject,
int[] measurementDefinitionIds)
|
void |
enableSchedulesForAutoGroup(Subject subject,
int parentResourceId,
int childResourceType,
int[] measurementDefinitionIds)
Enable the measurement schedules for the passed definitions of the rsource ot the passed auto group. |
void |
enableSchedulesForCompatibleGroup(Subject subject,
int groupId,
int[] measurementDefinitionIds)
Enable the measurement schedules for the passed definitions for the resources of the passed compatible group. |
void |
enableSchedulesForResource(Subject subject,
int resourceId,
int[] measurementDefinitionIds)
Enable the schedules for the provided definitions and resource |
void |
errorCorrectSchedules()
This method should be called when it is determined that the data in the measurement schedule table might be corrupt. |
PageList<MeasurementScheduleComposite> |
findScheduleCompositesForResource(Subject subject,
int resourceId,
DataType dataType,
PageControl pageControl)
Retrieves the metric collection schedules for the given resource. |
PageList<MeasurementSchedule> |
findSchedulesByCriteria(Subject subject,
MeasurementScheduleCriteria criteria)
|
java.util.List<MeasurementSchedule> |
findSchedulesByIds(int[] scheduleIds)
Return a list of MeasurementSchedules for the given ids |
java.util.List<MeasurementSchedule> |
findSchedulesByResourceIdAndDefinitionIds(Subject subject,
int resourceId,
int[] definitionIds)
Return a list of MeasurementSchedules for the given definition ids and resource id. |
java.util.List<MeasurementSchedule> |
findSchedulesByResourceIdsAndDefinitionId(Subject subject,
int[] resourceIds,
int definitionId)
Find MeasurementSchedules that are attached to a certain definition and some resources |
PageList<MeasurementScheduleComposite> |
findSchedulesForAutoGroup(Subject subject,
int parentId,
int childType,
PageControl pageControl)
Get the MeasurementSchedule composits for an autogroup |
PageList<MeasurementScheduleComposite> |
findSchedulesForCompatibleGroup(Subject subject,
int groupId,
PageControl pageControl)
Get the MeasurementSchedule composites for a compatible group. |
PageList<MeasurementScheduleComposite> |
findSchedulesForResource(Subject subject,
int resourceId,
PageControl pageControl)
Retrieves the metric collection schedules for the given resource. |
java.util.Set<ResourceMeasurementScheduleRequest> |
findSchedulesForResourceAndItsDescendants(int[] resourceIds,
boolean getDescendents)
Given a resource ID, this will return all schedule collections for all of the resource's measurements, including all measurements for the resource's children. |
java.util.List<MeasurementSchedule> |
findSchedulesForResourceAndType(Subject subject,
int resourceId,
DataType dataType,
DisplayType displayType,
boolean enabledOnly)
Determine the Schedules for a Resource and DataType. |
AgentClient |
getAgentClientForSchedule(MeasurementSchedule sched)
Get the AgentClient (the connection to the agent) for a certain Schedule |
MeasurementSchedule |
getSchedule(Subject subject,
int resourceId,
int definitionId,
boolean attachBaseline)
Find MeasurementSchedules that are attached to a certain definition and a resource |
MeasurementSchedule |
getScheduleById(int scheduleId)
Returns a MeasurementSchedule by its primary key or null. |
MeasurementSchedule |
getScheduleById(Subject subject,
int scheduleId)
Obtain a MeasurementSchedule by its Id after a check for a valid session |
int |
getScheduledMeasurementsPerMinute()
|
int |
insertSchedulesFor(int[] batchIds)
|
int |
returnSchedulesFor(int[] batchIds,
java.util.Set<ResourceMeasurementScheduleRequest> allSchedules)
|
void |
updateDefaultCollectionIntervalForMeasurementDefinitions(Subject subject,
int[] measurementDefinitionIds,
long collectionInterval,
boolean updateExistingSchedules)
(Re-)Enables all collection schedules in the given measurement definition IDs and sets their collection intervals. |
void |
updateMeasurementTemplates(Subject subject,
int[] measurementDefinitionIds,
long collectionInterval)
|
void |
updateSchedule(Subject subject,
MeasurementSchedule schedule)
Reattach a Schedule to a PersitenceContext after a successful check for a valid session |
void |
updateSchedules(Subject subject,
int resourceId,
int[] measurementDefinitionIds,
long collectionInterval)
|
void |
updateSchedulesForAutoGroup(Subject subject,
int parentResourceId,
int childResourceType,
int[] measurementDefinitionIds,
long collectionInterval)
Enables all collection schedules attached to the given auto group whose schedules are based off the given definitions. |
void |
updateSchedulesForCompatibleGroup(Subject subject,
int groupId,
int[] measurementDefinitionIds,
long collectionInterval)
Enables all collection schedules attached to the given compatible group whose schedules are based off the given definitions. |
void |
updateSchedulesForResource(Subject subject,
int resourceId,
int[] measurementDefinitionIds,
long collectionInterval)
Enables all collection schedules attached to the given resource whose schedules are based off the given definitions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MeasurementScheduleManagerBean()
| Method Detail |
|---|
public java.util.Set<ResourceMeasurementScheduleRequest> findSchedulesForResourceAndItsDescendants(int[] resourceIds,
boolean getDescendents)
MeasurementScheduleManagerLocal
findSchedulesForResourceAndItsDescendants in interface MeasurementScheduleManagerLocalresourceIds - IDs of the resources whose measurements are to be returnedgetDescendents - if true, descendents will be loaded as well
public AgentClient getAgentClientForSchedule(MeasurementSchedule sched)
getAgentClientForSchedule in interface MeasurementScheduleManagerLocalsched - A MeasurementSchedule for which we need a connection to the Agent
public MeasurementSchedule getScheduleById(int scheduleId)
scheduleId - the id of the desired schedule
public java.util.List<MeasurementSchedule> findSchedulesByIds(int[] scheduleIds)
findSchedulesByIds in interface MeasurementScheduleManagerLocalids - PrimaryKeys of the schedules searched
public MeasurementSchedule getScheduleById(Subject subject,
int scheduleId)
getScheduleById in interface MeasurementScheduleManagerLocalsubject - a session id that must be validscheduleId - The primary key of the Schedule
public java.util.List<MeasurementSchedule> findSchedulesByResourceIdsAndDefinitionId(Subject subject,
int[] resourceIds,
int definitionId)
findSchedulesByResourceIdsAndDefinitionId in interface MeasurementScheduleManagerLocalsubject - A subject that must be validdefinitionId - The primary key of a MeasurementDefinitionresourceIds - primary of Resources wanted
public MeasurementSchedule getSchedule(Subject subject,
int resourceId,
int definitionId,
boolean attachBaseline)
throws MeasurementNotFoundException
getSchedule in interface MeasurementScheduleManagerLocalsubject - definitionId - The primary key of a MeasurementDefinitionresourceId - the id of the resourceattachBaseline - baseline won't be attached to the schedule by default do to LAZY annotation on the managed
relationship. attachBaseline, if true, will eagerly load it for the caller
MeasurementNotFoundException
public PageList<MeasurementScheduleComposite> findSchedulesForAutoGroup(Subject subject,
int parentId,
int childType,
PageControl pageControl)
findSchedulesForAutoGroup in interface MeasurementScheduleManagerLocalsubject - parentId - childType - pageControl -
public PageList<MeasurementScheduleComposite> findSchedulesForCompatibleGroup(Subject subject,
int groupId,
PageControl pageControl)
findSchedulesForCompatibleGroup in interface MeasurementScheduleManagerLocal
public PageList<MeasurementScheduleComposite> findScheduleCompositesForResource(Subject subject,
int resourceId,
@Nullable
DataType dataType,
PageControl pageControl)
MeasurementScheduleManagerLocal
findScheduleCompositesForResource in interface MeasurementScheduleManagerLocalsubject - the current userresourceId - a Resource iddataType - the data type to limit results to, or null to not limit results to a particular data typepageControl - the page control for the results
public PageList<MeasurementScheduleComposite> findSchedulesForResource(Subject subject,
int resourceId,
PageControl pageControl)
MeasurementScheduleManagerLocal
findSchedulesForResource in interface MeasurementScheduleManagerLocalsubject - the current userresourceId - a Resource idpageControl - the page control for the results
public void disableDefaultCollectionForMeasurementDefinitions(Subject subject,
int[] measurementDefinitionIds,
boolean updateSchedules)
MeasurementScheduleManagerLocal#disableSchedules(Subject, int[], int).
disableDefaultCollectionForMeasurementDefinitions in interface MeasurementScheduleManagerLocalupdateSchedules - TODOpublic void disableAllDefaultCollections(Subject subject)
MeasurementScheduleManagerLocal#disableAllMeasurementSchedules(Subject).
This is a highly disruptive method - it turns off monitoring for future resources. The user making this call must have global inventory and setting permissions to execute this.
disableAllDefaultCollections in interface MeasurementScheduleManagerLocalsubject - user that must have global inventory and setting rightspublic void disableAllSchedules(Subject subject)
MeasurementScheduleManagerLocalMeasurementScheduleManagerLocal.disableAllDefaultCollections(Subject).
This is a highly disruptive method - it turns off monitoring for existing resources. The user making this call must have global inventory and setting permissions to execute this.
disableAllSchedules in interface MeasurementScheduleManagerLocalsubject - user that must have global inventory and setting rights
public void createSchedulesForExistingResources(ResourceType type,
MeasurementDefinition newDefinition)
MeasurementScheduleManagerLocalMeasurementSchedules for existing resources hanging on newType.
createSchedulesForExistingResources in interface MeasurementScheduleManagerLocaltype - The ResourceType for which we want to add schedulesnewDefinition - The MeasurementDefinition where we derive the schedules from
public void updateDefaultCollectionIntervalForMeasurementDefinitions(Subject subject,
int[] measurementDefinitionIds,
long collectionInterval,
boolean updateExistingSchedules)
updateDefaultCollectionIntervalForMeasurementDefinitions in interface MeasurementScheduleManagerLocalsubject - a valid subject that has Permission.MANAGE_SETTINGSmeasurementDefinitionIds - The primary keys for the definitionscollectionInterval - the new interval in millisconds for collectionupdateExistingSchedules - If true, then existing schedules for this definition will also be updated.
public void updateSchedules(Subject subject,
int resourceId,
int[] measurementDefinitionIds,
long collectionInterval)
public void updateSchedulesForAutoGroup(Subject subject,
int parentResourceId,
int childResourceType,
int[] measurementDefinitionIds,
long collectionInterval)
updateSchedulesForAutoGroup in interface MeasurementScheduleManagerLocalsubject - Subject of the callermeasurementDefinitionIds - the definitions on which the schedules to update are basedparentResourceId - the Id of the parent resourcechildResourceType - the ID of the ResourceType of the children that form the autogroupcollectionInterval - the new intervalorg.rhq.enterprise.server.measurement.MeasurementScheduleManagerLocal#updateSchedulesForAutoGroup(org.rhq.core.domain.auth.Subject,
int[], int, int, long)
public void disableSchedulesForAutoGroup(Subject subject,
int parentResourceId,
int childResourceType,
int[] measurementDefinitionIds)
disableSchedulesForAutoGroup in interface MeasurementScheduleManagerLocalsubject - measurementDefinitionIds - parentResourceId - childResourceType -
public void enableSchedulesForAutoGroup(Subject subject,
int parentResourceId,
int childResourceType,
int[] measurementDefinitionIds)
enableSchedulesForAutoGroup in interface MeasurementScheduleManagerLocalsubject - measurementDefinitionIds - parentResourceId - childResourceType -
public java.util.List<MeasurementSchedule> findSchedulesForResourceAndType(Subject subject,
int resourceId,
DataType dataType,
DisplayType displayType,
boolean enabledOnly)
findSchedulesForResourceAndType in interface MeasurementScheduleManagerLocalsubject - Subject of the callerresourceId - PK of the resource we're interested indataType - DataType of the desired results use null for no filteringdisplayType - the display type of the property or null for no filteringenabledOnly - should we restrict the query to certain enablement state? null means "don't care".
public java.util.List<MeasurementSchedule> findSchedulesByResourceIdAndDefinitionIds(Subject subject,
int resourceId,
int[] definitionIds)
findSchedulesByResourceIdAndDefinitionIds in interface MeasurementScheduleManagerLocaldefinitionIds - resourceId -
public int insertSchedulesFor(int[] batchIds)
throws java.lang.Exception
insertSchedulesFor in interface MeasurementScheduleManagerLocaljava.lang.Exception
public int returnSchedulesFor(int[] batchIds,
java.util.Set<ResourceMeasurementScheduleRequest> allSchedules)
throws java.lang.Exception
returnSchedulesFor in interface MeasurementScheduleManagerLocaljava.lang.Exceptionpublic int getScheduledMeasurementsPerMinute()
getScheduledMeasurementsPerMinute in interface MeasurementScheduleManagerLocalpublic void errorCorrectSchedules()
MeasurementScheduleManagerLocal
errorCorrectSchedules in interface MeasurementScheduleManagerLocal
public void disableSchedulesForResource(Subject subject,
int resourceId,
int[] measurementDefinitionIds)
MeasurementScheduleManagerLocal
disableSchedulesForResource in interface MeasurementScheduleManagerLocaldisableSchedulesForResource in interface MeasurementScheduleManagerRemote
public void disableSchedulesForCompatibleGroup(Subject subject,
int groupId,
int[] measurementDefinitionIds)
disableSchedulesForCompatibleGroup in interface MeasurementScheduleManagerLocaldisableSchedulesForCompatibleGroup in interface MeasurementScheduleManagerRemote
public void disableMeasurementTemplates(Subject subject,
int[] measurementDefinitionIds)
disableMeasurementTemplates in interface MeasurementScheduleManagerLocaldisableMeasurementTemplates in interface MeasurementScheduleManagerRemote
public void enableSchedulesForResource(Subject subject,
int resourceId,
int[] measurementDefinitionIds)
MeasurementScheduleManagerLocal
enableSchedulesForResource in interface MeasurementScheduleManagerLocalenableSchedulesForResource in interface MeasurementScheduleManagerRemote
public void enableSchedulesForCompatibleGroup(Subject subject,
int groupId,
int[] measurementDefinitionIds)
enableSchedulesForCompatibleGroup in interface MeasurementScheduleManagerLocalenableSchedulesForCompatibleGroup in interface MeasurementScheduleManagerRemote
public void enableMeasurementTemplates(Subject subject,
int[] measurementDefinitionIds)
enableMeasurementTemplates in interface MeasurementScheduleManagerLocalenableMeasurementTemplates in interface MeasurementScheduleManagerRemote
public void updateSchedule(Subject subject,
MeasurementSchedule schedule)
MeasurementScheduleManagerLocal
updateSchedule in interface MeasurementScheduleManagerLocalupdateSchedule in interface MeasurementScheduleManagerRemotesubject - A subject that must be validschedule - A MeasurementSchedule to persist.
public void updateSchedulesForResource(Subject subject,
int resourceId,
int[] measurementDefinitionIds,
long collectionInterval)
MeasurementScheduleManagerLocal
updateSchedulesForResource in interface MeasurementScheduleManagerLocalupdateSchedulesForResource in interface MeasurementScheduleManagerRemote
public void updateSchedulesForCompatibleGroup(Subject subject,
int groupId,
int[] measurementDefinitionIds,
long collectionInterval)
updateSchedulesForCompatibleGroup in interface MeasurementScheduleManagerLocalupdateSchedulesForCompatibleGroup in interface MeasurementScheduleManagerRemotesubject - Subject of the callermeasurementDefinitionIds - the definitions on which the schedules to update are basedgroupId - ID of the groupcollectionInterval - the new intervalorg.rhq.enterprise.server.measurement.MeasurementScheduleManagerLocal#updateSchedulesForCompatibleGroup(org.rhq.core.domain.auth.Subject,
int[], int, long)
public void updateMeasurementTemplates(Subject subject,
int[] measurementDefinitionIds,
long collectionInterval)
updateMeasurementTemplates in interface MeasurementScheduleManagerLocalupdateMeasurementTemplates in interface MeasurementScheduleManagerRemote
public PageList<MeasurementSchedule> findSchedulesByCriteria(Subject subject,
MeasurementScheduleCriteria criteria)
findSchedulesByCriteria in interface MeasurementScheduleManagerLocalfindSchedulesByCriteria in interface MeasurementScheduleManagerRemote
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||