public interface MeasurementScheduleManagerLocal extends MeasurementScheduleManagerRemote
MeasurementSchedules.| Modifier and Type | Method and Description |
|---|---|
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)
Deprecated.
portal-war
|
void |
disableAllSchedules(org.rhq.core.domain.auth.Subject subject)
Deprecated.
portal-war
|
void |
disableDefaultCollectionForMeasurementDefinitions(org.rhq.core.domain.auth.Subject subject,
int[] measurementDefinitionIds,
boolean updateSchedules)
Disables all collection schedules in the given measurement definition IDs.
|
void |
disableSchedulesForAutoGroup(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int childResourceType,
int[] measurementDefinitionIds)
Deprecated.
portal-war
|
int |
disableSchedulesForContext(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext context,
int[] measurementDefinitionIds) |
void |
enableSchedulesForAutoGroup(org.rhq.core.domain.auth.Subject subject,
int parentResourceId,
int childResourceType,
int[] measurementDefinitionIds)
Deprecated.
portal-war
|
int |
enableSchedulesForContext(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext context,
int[] measurementDefinitionIds) |
void |
errorCorrectSchedules()
This method should be called when it is determined that the data in the measurement schedule table might be
corrupt.
|
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)
Deprecated.
portal-war
|
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.
|
int |
updateSchedulesForContext(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.common.EntityContext context,
int[] measurementDefinitionIds,
long collectionInterval) |
disableMeasurementTemplates, disableSchedulesForCompatibleGroup, disableSchedulesForResource, disableSchedulesForResourceType, enableMeasurementTemplates, enableSchedulesForCompatibleGroup, enableSchedulesForResource, enableSchedulesForResourceType, findSchedulesByCriteria, updateMeasurementTemplates, updateSchedule, updateSchedulesForCompatibleGroup, updateSchedulesForResource, updateSchedulesForResourceTypeSet<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 wellAgentClient 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 AgentAgentClient that can be used to communicate with the AgentList<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 Scheduleorg.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 - TODOMeasurementNotFoundExceptionvoid 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 rightsvoid 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 schedulesvoid 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 intervalList<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 fromint 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 searchedList<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 wantedList<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 definitionsorg.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 notifyAgentsOfScheduleUpdates(org.rhq.core.domain.common.EntityContext entityContext,
String scheduleSubQuery)
entityContext - the context.scheduleSubQuery - the subquery indicating which schedules changedCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.