|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MeasurementScheduleManagerLocal
A manager for MeasurementSchedules.
| Method Summary | |
|---|---|
void |
createSchedulesForExistingResources(org.rhq.core.domain.resource.ResourceType type,
org.rhq.core.domain.measurement.MeasurementDefinition newDefinition)
Create MeasurementSchedules for existing resources hanging on newType. |
void |
disableAllDefaultCollections(org.rhq.core.domain.auth.Subject subject)
Disables all collection schedules for all measurement definitions. |
void |
disableAllSchedules(org.rhq.core.domain.auth.Subject subject)
Disables all collection schedules attached to all resources. |
void |
disableDefaultCollectionForMeasurementDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] measurementDefinitionIds,
boolean updateSchedules)
Disables all collection schedules in the given measurement definition IDs. |
void |
disableMeasurementTemplates(org.rhq.core.domain.auth.Subject subject,
int[] measurementDefinitionIds)
|
void |
disableSchedulesForAutoGroup(org.rhq.core.domain.auth.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(org.rhq.core.domain.auth.Subject subject,
int groupId,
int[] measurementDefinitionIds)
Disable the measurement schedules for the passed definitions for the resources of the passed compatible group. |
int |
disableSchedulesForContext(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext context,
int[] measurementDefinitionIds)
|
void |
disableSchedulesForResource(org.rhq.core.domain.auth.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(org.rhq.core.domain.auth.Subject subject,
int[] measurementDefinitionIds)
|
void |
enableSchedulesForAutoGroup(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int childResourceType,
int[] measurementDefinitionIds)
Enable the measurement schedules for the passed definitions of the resource ot the passed auto group. |
void |
enableSchedulesForCompatibleGroup(org.rhq.core.domain.auth.Subject subject,
int groupId,
int[] measurementDefinitionIds)
Enable the measurement schedules for the passed definitions for the resources of the passed compatible group. |
int |
enableSchedulesForContext(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext context,
int[] measurementDefinitionIds)
|
void |
enableSchedulesForResource(org.rhq.core.domain.auth.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. |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.MeasurementSchedule> |
findSchedulesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.MeasurementScheduleCriteria criteria)
TODO |
List<org.rhq.core.domain.measurement.MeasurementSchedule> |
findSchedulesByIds(int[] ids)
Return a list of MeasurementSchedules for the given ids |
List<org.rhq.core.domain.measurement.MeasurementSchedule> |
findSchedulesByResourceIdAndDefinitionIds(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] definitionIds)
Return a list of MeasurementSchedules for the given definition ids and resource id. |
List<org.rhq.core.domain.measurement.MeasurementSchedule> |
findSchedulesByResourceIdsAndDefinitionId(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds,
int definitionId)
Find MeasurementSchedules that are attached to a certain definition and some resources |
List<org.rhq.core.domain.measurement.MeasurementSchedule> |
findSchedulesByResourceIdsAndDefinitionIds(int[] resourceIds,
int[] definitionIds)
Return a list of MeasurementSchedules for the given definition ids and resource ids. |
Set<org.rhq.core.domain.measurement.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. |
List<org.rhq.core.domain.measurement.MeasurementSchedule> |
findSchedulesForResourceAndType(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.measurement.DataType dataType,
org.rhq.core.domain.measurement.DisplayType displayType,
boolean enabledOnly)
Determine the Schedules for a Resource and DataType. |
AgentClient |
getAgentClientForSchedule(org.rhq.core.domain.measurement.MeasurementSchedule sched)
Get the AgentClient (the connection to the agent) that is associated with the given schedule. |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.composite.MeasurementScheduleComposite> |
getMeasurementScheduleCompositesByContext(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext context,
org.rhq.core.domain.util.PageControl pc)
|
org.rhq.core.domain.measurement.MeasurementSchedule |
getSchedule(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int definitionId,
boolean attachBaseline)
Find MeasurementSchedules that are attached to a certain definition and a resource |
org.rhq.core.domain.measurement.MeasurementSchedule |
getScheduleById(org.rhq.core.domain.auth.Subject subject,
int scheduleId)
Obtain a MeasurementSchedule by its Id after a check for a valid session |
int |
getScheduledMeasurementsPerMinute()
|
int |
insertSchedulesFor(int[] batchIds)
|
void |
notifyAgentsOfScheduleUpdates(org.rhq.core.domain.common.EntityContext entityContext,
String scheduleSubQuery)
Notifies all agents of measurement schedule changes. |
int |
returnSchedulesFor(int[] batchIds,
Set<org.rhq.core.domain.measurement.ResourceMeasurementScheduleRequest> allSchedules)
|
void |
updateDefaultCollectionIntervalAndEnablementForMeasurementDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] measurementDefinitionIds,
long collectionInterval,
boolean enable,
boolean updateExistingSchedules)
Using this method one can both update the default collection interval AND enable or disable the measurement definitions. |
void |
updateDefaultCollectionIntervalForMeasurementDefinitions(org.rhq.core.domain.auth.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(org.rhq.core.domain.auth.Subject subject,
int[] measurementDefinitionIds,
long collectionInterval)
Update default measurement schedules ("metric templates"). |
void |
updateSchedule(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.measurement.MeasurementSchedule schedule)
Reattach a Schedule to a PersitenceContext after a successful check for a valid session |
void |
updateSchedulesForAutoGroup(org.rhq.core.domain.auth.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(org.rhq.core.domain.auth.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. |
int |
updateSchedulesForContext(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext context,
int[] measurementDefinitionIds,
long collectionInterval)
|
void |
updateSchedulesForResource(org.rhq.core.domain.auth.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. |
| Method Detail |
|---|
Set<org.rhq.core.domain.measurement.ResourceMeasurementScheduleRequest> findSchedulesForResourceAndItsDescendants(int[] resourceIds,
boolean getDescendents)
resourceIds - IDs of the resources whose measurements are to be returnedgetDescendents - if true, descendents will be loaded as well
AgentClient getAgentClientForSchedule(org.rhq.core.domain.measurement.MeasurementSchedule sched)
AgentClient (the connection to the agent) that is associated with the given schedule.
sched - a MeasurementSchedule for which we need a connection to the Agent
AgentClient that can be used to communicate with the Agent
List<org.rhq.core.domain.measurement.MeasurementSchedule> findSchedulesByResourceIdAndDefinitionIds(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] definitionIds)
definitionIds - resourceId -
org.rhq.core.domain.measurement.MeasurementSchedule getScheduleById(org.rhq.core.domain.auth.Subject subject,
int scheduleId)
subject - a session id that must be validscheduleId - The primary key of the Schedule
org.rhq.core.domain.measurement.MeasurementSchedule getSchedule(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int definitionId,
boolean attachBaseline)
throws MeasurementNotFoundException
subject - definitionId - The primary key of a MeasurementDefinitionresourceId - the id of the resourceattachBaseline - TODO
MeasurementNotFoundException
void disableDefaultCollectionForMeasurementDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] measurementDefinitionIds,
boolean updateSchedules)
#disableSchedules(Subject, int[], int).
subject - measurementDefinitionIds - updateSchedules - TODOvoid disableAllDefaultCollections(org.rhq.core.domain.auth.Subject subject)
#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.
subject - user that must have global inventory and setting rightsvoid disableAllSchedules(org.rhq.core.domain.auth.Subject subject)
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.
subject - user that must have global inventory and setting rights
void updateDefaultCollectionIntervalForMeasurementDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] measurementDefinitionIds,
long collectionInterval,
boolean updateExistingSchedules)
subject - a valid subject that has the MANAGE_SETTINGS
global permissionmeasurementDefinitionIds - the primary keys for the definitionscollectionInterval - if > 0, enable the metric with this value as the the new collection
interval, in milliseconds; if == 0, enable the metric with its current
collection interval; if < 0, disable the metric; if >0, the value
should also be >=30000, since 30s is the minimum allowed interval; if
it is not, 30000 will be used instead of the specified intervalupdateExistingSchedules - if true, then existing schedules for this definition will also be updated.
void updateDefaultCollectionIntervalAndEnablementForMeasurementDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] measurementDefinitionIds,
long collectionInterval,
boolean enable,
boolean updateExistingSchedules)
subject - the current usermeasurementDefinitionIds - the ids of measurement definitions to updatecollectionInterval - the default collection interval to setenable - whether to enable or disable the measurement definitionupdateExistingSchedules - whether to accordingly update the existing schedules
void updateSchedulesForAutoGroup(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int childResourceType,
int[] measurementDefinitionIds,
long collectionInterval)
subject - 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 interval
List<org.rhq.core.domain.measurement.MeasurementSchedule> findSchedulesForResourceAndType(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.measurement.DataType dataType,
org.rhq.core.domain.measurement.DisplayType displayType,
boolean enabledOnly)
subject - 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 desired or null for no filteringenabledOnly - should we restrict the query to certain enablement state? null means "don't care".
int getScheduledMeasurementsPerMinute()
void disableSchedulesForAutoGroup(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int childResourceType,
int[] measurementDefinitionIds)
subject - measurementDefinitionIds - parentResourceId - childResourceType -
void enableSchedulesForAutoGroup(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int childResourceType,
int[] measurementDefinitionIds)
subject - measurementDefinitionIds - parentResourceId - childResourceType -
void createSchedulesForExistingResources(org.rhq.core.domain.resource.ResourceType type,
org.rhq.core.domain.measurement.MeasurementDefinition newDefinition)
MeasurementSchedules for existing resources hanging on newType.
type - The ResourceType for which we want to add schedulesnewDefinition - The MeasurementDefinition where we derive the schedules from
int insertSchedulesFor(int[] batchIds)
throws Exception
Exception
int returnSchedulesFor(int[] batchIds,
Set<org.rhq.core.domain.measurement.ResourceMeasurementScheduleRequest> allSchedules)
throws Exception
Exceptionvoid errorCorrectSchedules()
List<org.rhq.core.domain.measurement.MeasurementSchedule> findSchedulesByIds(int[] ids)
ids - PrimaryKeys of the schedules searched
List<org.rhq.core.domain.measurement.MeasurementSchedule> findSchedulesByResourceIdsAndDefinitionId(org.rhq.core.domain.auth.Subject subject,
int[] resourceIds,
int definitionId)
subject - A session id that must be validdefinitionId - The primary key of a MeasurementDefinitionresourceIds - primary of Resources wanted
List<org.rhq.core.domain.measurement.MeasurementSchedule> findSchedulesByResourceIdsAndDefinitionIds(int[] resourceIds,
int[] definitionIds)
resourceIds - The ids of the resource for which schedules are being fetcheddefinitionIds - The ids of the the measurement definitions
org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.composite.MeasurementScheduleComposite> getMeasurementScheduleCompositesByContext(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext context,
org.rhq.core.domain.util.PageControl pc)
int updateSchedulesForContext(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext context,
int[] measurementDefinitionIds,
long collectionInterval)
int enableSchedulesForContext(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext context,
int[] measurementDefinitionIds)
int disableSchedulesForContext(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext context,
int[] measurementDefinitionIds)
void disableSchedulesForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] measurementDefinitionIds)
subject - measurementDefinitionIds - resourceId -
void disableSchedulesForCompatibleGroup(org.rhq.core.domain.auth.Subject subject,
int groupId,
int[] measurementDefinitionIds)
void disableMeasurementTemplates(org.rhq.core.domain.auth.Subject subject,
int[] measurementDefinitionIds)
void enableSchedulesForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] measurementDefinitionIds)
subject - measurementDefinitionIds - resourceId -
void enableSchedulesForCompatibleGroup(org.rhq.core.domain.auth.Subject subject,
int groupId,
int[] measurementDefinitionIds)
void enableMeasurementTemplates(org.rhq.core.domain.auth.Subject subject,
int[] measurementDefinitionIds)
void updateSchedule(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.measurement.MeasurementSchedule schedule)
subject - A session id that must be validschedule - A MeasurementSchedule to persist.
void updateSchedulesForResource(org.rhq.core.domain.auth.Subject subject,
int resourceId,
int[] measurementDefinitionIds,
long collectionInterval)
subject - measurementDefinitionIds - resourceId - collectionInterval -
void updateSchedulesForCompatibleGroup(org.rhq.core.domain.auth.Subject subject,
int groupId,
int[] measurementDefinitionIds,
long collectionInterval)
subject - Subject of the callermeasurementDefinitionIds - the definitions on which the schedules to update are basedgroupId - ID of the groupcollectionInterval - the new interval
void updateMeasurementTemplates(org.rhq.core.domain.auth.Subject subject,
int[] measurementDefinitionIds,
long collectionInterval)
subject - Subject of the callermeasurementDefinitionIds - the definitions on which the default schedules to update are basedcollectionInterval - the new interval
org.rhq.core.domain.util.PageList<org.rhq.core.domain.measurement.MeasurementSchedule> findSchedulesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.MeasurementScheduleCriteria criteria)
subject - criteria -
void notifyAgentsOfScheduleUpdates(org.rhq.core.domain.common.EntityContext entityContext,
String scheduleSubQuery)
entityContext - the context.scheduleSubQuery - the subquery indicating which schedules changed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||