public interface OperationManagerRemote
| Modifier and Type | Method and Description |
|---|---|
void |
cancelOperationHistory(org.rhq.core.domain.auth.Subject subject,
int operationHistoryId,
boolean ignoreAgentErrors)
Cancels a currently in-progress operation.
|
void |
deleteOperationHistories(org.rhq.core.domain.auth.Subject subject,
int[] historyIds,
boolean deleteEvenIfInProgress)
Same as
deleteOperationHistory(Subject, int, boolean) but applied to all supplied historyIds. |
void |
deleteOperationHistory(org.rhq.core.domain.auth.Subject subject,
int operationHistoryId,
boolean purgeInProgress)
Purges the history from the database.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.GroupOperationHistory> |
findGroupOperationHistoriesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.GroupOperationHistoryCriteria criteria) |
List<org.rhq.core.domain.operation.OperationDefinition> |
findOperationDefinitionsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.OperationDefinitionCriteria criteria) |
org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.ResourceOperationHistory> |
findResourceOperationHistoriesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.ResourceOperationHistoryCriteria criteria) |
List<org.rhq.core.domain.operation.bean.GroupOperationSchedule> |
findScheduledGroupOperations(org.rhq.core.domain.auth.Subject subject,
int groupId)
Returns the list of scheduled operations for the given resource group.
|
List<org.rhq.core.domain.operation.bean.ResourceOperationSchedule> |
findScheduledResourceOperations(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Returns the list of scheduled operations for the given resource.
|
org.rhq.core.domain.operation.bean.GroupOperationSchedule |
scheduleGroupOperation(org.rhq.core.domain.auth.Subject subject,
int groupId,
int[] executionOrderResourceIds,
boolean haltOnFailure,
String operationName,
org.rhq.core.domain.configuration.Configuration parameters,
long delay,
long repeatInterval,
int repeatCount,
int timeout,
String description) |
org.rhq.core.domain.operation.bean.GroupOperationSchedule |
scheduleGroupOperationUsingCron(org.rhq.core.domain.auth.Subject subject,
int groupId,
int[] executionOrderResourceIds,
boolean haltOnFailure,
String operationName,
org.rhq.core.domain.configuration.Configuration parameters,
String cronExpression,
int timeout,
String description)
Schedules an operation for execution on members of the given group using the cron expression.
|
org.rhq.core.domain.operation.bean.ResourceOperationSchedule |
scheduleResourceOperation(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String operationName,
long delay,
long repeatInterval,
int repeatCount,
int timeout,
org.rhq.core.domain.configuration.Configuration parameters,
String description)
Schedules an operation for execution on the given resource.
|
org.rhq.core.domain.operation.bean.ResourceOperationSchedule |
scheduleResourceOperationUsingCron(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String operationName,
String cronExpression,
int timeout,
org.rhq.core.domain.configuration.Configuration parameters,
String description)
Schedules a Resource operation for execution using the cron expression.
|
void |
unscheduleGroupOperation(org.rhq.core.domain.auth.Subject subject,
String jobId,
int resourceGroupId)
Unschedule the group operation identified with the given job ID.
|
void |
unscheduleResourceOperation(org.rhq.core.domain.auth.Subject subject,
String jobId,
int resourceId)
Unschedule the resource operation identified with the given job ID.
|
void cancelOperationHistory(org.rhq.core.domain.auth.Subject subject,
int operationHistoryId,
boolean ignoreAgentErrors)
Note that this method will handle canceling a resource or group history - depending on what the given
historyId
refers to. If it refers to a group history, it will cancel all the resource invocations for that group
invocation.
If the cancel request succeeds, the history element will be checked against the AlertConditionCacheManager.
subject - The logged in user's subject.operationHistoryId - the ID of the history item identifying the in-progress operationignoreAgentErrors - if true this will still flag the history items in the database as canceled, even if the
method failed to notify the agent(s) that the operation should be canceled. If false,
this method will not update the history status unless it could successfully tell the agent(s) to
cancel the operation.void deleteOperationHistory(org.rhq.core.domain.auth.Subject subject,
int operationHistoryId,
boolean purgeInProgress)
Note that this method will handle deleting a resource or group history - depending on what the given
historyId
refers to.
subject - The logged in user's subject.operationHistoryId - the ID of the history to be deletedpurgeInProgress - if true, even if the operation is in progress, the history entity will be deleted. You
normally do not want to purge operation histories until they are completed, so you normally pass in
false, but a user might want to force it to be purged, in which case the UI will want
to pass in truevoid deleteOperationHistories(org.rhq.core.domain.auth.Subject subject,
int[] historyIds,
boolean deleteEvenIfInProgress)
throws ApplicationException
deleteOperationHistory(Subject, int, boolean) but applied to all supplied historyIds.
Supports partial success.subject - historyIds - deleteEvenIfInProgress - ApplicationException - Thrown if any history records fail to delete. Message indicates
partial success and gives detail on each failure.org.rhq.core.domain.operation.bean.ResourceOperationSchedule scheduleResourceOperation(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String operationName,
long delay,
long repeatInterval,
int repeatCount,
int timeout,
org.rhq.core.domain.configuration.Configuration parameters,
String description)
throws ScheduleException
subject - The logged in user's subject.resourceId - the resource that is the target of the operationoperationName - the actual operation to invokedelay - the number of milliseconds to delay this operation, 0 for immediate start.repeatInterval - the number of milliseconds after completion to repeat this operation. 0 for no repeat.repeatCount - the number of times to repeat this operation. -1 infinite, 0 for no repeat.timeout - the number of seconds before this operation will fail due to timeout. 0 for no timeout.parameters - the names parameters for the operation.description - user-entered description of the job to be scheduledScheduleException - if failed to schedule the operationorg.rhq.core.domain.operation.bean.ResourceOperationSchedule scheduleResourceOperationUsingCron(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String operationName,
String cronExpression,
int timeout,
org.rhq.core.domain.configuration.Configuration parameters,
String description)
throws ScheduleException
subject - the user who is asking to schedule the jobresourceId - the resource that is the target of the operationoperationName - the actual operation to invokecronExpression - the cron expression specifying the repetition.
For example:
0 0 12 * * ? Fire at 12pm (noon) every day 0 15 10 ? * * Fire at 10:15am every day 0 15 10 * * ? Fire at 10:15am every day 0 15 10 * * ? * Fire at 10:15am every day 0 15 10 * * ? 2005 Fire at 10:15am every day during the year 2005 0 * 14 * * ? every minute starting at 2pm and ending at 2:59pm, every day 0 0/5 14 * * ? every 5 minutes starting at 2pm and ending at 2:55pm, ev. d. 0 0-5 14 * * ? Fire every minute starting at 2pm and ending at 2:05pm, every day 0 10,44 14 ? 3 WED Fire at 2:10pm and at 2:44pm every Wednesday in the month of March. 0 15 10 ? * MON-FRI Fire at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday 0 15 10 15 * ? Fire at 10:15am on the 15th day of every month 0 15 10 L * ? Fire at 10:15am on the last day of every month 0 15 10 ? * 6L Fire at 10:15am on the last Friday of every month 0 15 10 ? * 6L Fire at 10:15am on the last Friday of every month 0 15 10 ? * 6L 2002-2005 at 10:15am on every last Friday of every month during the years 0 15 10 ? * 6#3 Fire at 10:15am on the third Friday of every month 0 11 11 11 11 ? Fire every November 11th at 11:11am.
timeout - the number of seconds before this operation will fail due to timeout. 0 for no timeout.parameters - the names parameters for the operation.description - user-entered description of the job to be scheduledScheduleException - if failed to schedule the operationvoid unscheduleResourceOperation(org.rhq.core.domain.auth.Subject subject,
String jobId,
int resourceId)
throws UnscheduleException
subject - The logged in user's subject.jobId - identifies the operation to unscheduleresourceId - the ID of the resource whose operation is getting unscheduledUnscheduleExceptionorg.rhq.core.domain.operation.bean.GroupOperationSchedule scheduleGroupOperation(org.rhq.core.domain.auth.Subject subject,
int groupId,
int[] executionOrderResourceIds,
boolean haltOnFailure,
String operationName,
org.rhq.core.domain.configuration.Configuration parameters,
long delay,
long repeatInterval,
int repeatCount,
int timeout,
String description)
throws ScheduleException
subject - groupId - executionOrderResourceIds - haltOnFailure - operationName - parameters - delay - repeatInterval - repeatCount - timeout - description - ScheduleExceptionorg.rhq.core.domain.operation.bean.GroupOperationSchedule scheduleGroupOperationUsingCron(org.rhq.core.domain.auth.Subject subject,
int groupId,
int[] executionOrderResourceIds,
boolean haltOnFailure,
String operationName,
org.rhq.core.domain.configuration.Configuration parameters,
String cronExpression,
int timeout,
String description)
throws ScheduleException
subject - the user who is asking to schedule the jobgroupId - the compatible group whose member resources are the target of the operationexecutionOrderResourceIds - optional order of execution - if notnull, these are group members
resource IDs in the order in which the operations are invokedhaltOnFailure - if true, the group operation will halt whenever one individual
resource fails to execute. When executing in order, this means once a failure
occurs, the resources next in line to execute will abort and not attempt to
execute. If not executing in any particular order, you are not guaranteed which
will stop and which will continue since all are executed as fast as possible,
but the group operation will attempt to stop as best it can.operationName - the actual operation to invokeparameters - optional parameters to pass into the operationcronExpression - the cron expression specifying the repetition.
For example:
0 0 12 * * ? Fire at 12pm (noon) every day 0 15 10 ? * * Fire at 10:15am every day 0 15 10 * * ? Fire at 10:15am every day 0 15 10 * * ? * Fire at 10:15am every day 0 15 10 * * ? 2005 Fire at 10:15am every day during the year 2005 0 * 14 * * ? every minute starting at 2pm and ending at 2:59pm, every day 0 0/5 14 * * ? every 5 minutes starting at 2pm and ending at 2:55pm, ev. d. 0 0-5 14 * * ? Fire every minute starting at 2pm and ending at 2:05pm, every day 0 10,44 14 ? 3 WED Fire at 2:10pm and at 2:44pm every Wednesday in the month of March. 0 15 10 ? * MON-FRI Fire at 10:15am every Monday, Tuesday, Wednesday, Thursday and Friday 0 15 10 15 * ? Fire at 10:15am on the 15th day of every month 0 15 10 L * ? Fire at 10:15am on the last day of every month 0 15 10 ? * 6L Fire at 10:15am on the last Friday of every month 0 15 10 ? * 6L Fire at 10:15am on the last Friday of every month 0 15 10 ? * 6L 2002-2005 at 10:15am on every last Friday of every month during the years 0 15 10 ? * 6#3 Fire at 10:15am on the third Friday of every month 0 11 11 11 11 ? Fire every November 11th at 11:11am.
timeout - the number of seconds before this operation will fail due to timeout. 0 for no timeout.
are ignored and reset by this method)description - user-entered description of the job to be scheduledScheduleException - if failed to schedule the operationvoid unscheduleGroupOperation(org.rhq.core.domain.auth.Subject subject,
String jobId,
int resourceGroupId)
throws UnscheduleException
subject - the user who is asking to unschedule the operationjobId - identifies the operation to unscheduleresourceGroupId - the ID of the group whose operation is getting unscheduledUnscheduleExceptionList<org.rhq.core.domain.operation.bean.ResourceOperationSchedule> findScheduledResourceOperations(org.rhq.core.domain.auth.Subject subject, int resourceId) throws Exception
subject - The logged in user's subject.resourceId - ExceptionList<org.rhq.core.domain.operation.bean.GroupOperationSchedule> findScheduledGroupOperations(org.rhq.core.domain.auth.Subject subject, int groupId) throws Exception
subject - The logged in user's subject.groupId - ExceptionList<org.rhq.core.domain.operation.OperationDefinition> findOperationDefinitionsByCriteria(org.rhq.core.domain.auth.Subject subject, org.rhq.core.domain.criteria.OperationDefinitionCriteria criteria)
subject - The logged in user's subject.criteria - The criteria object for the finding.org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.ResourceOperationHistory> findResourceOperationHistoriesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.ResourceOperationHistoryCriteria criteria)
subject - criteria - org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.GroupOperationHistory> findGroupOperationHistoriesByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.GroupOperationHistoryCriteria criteria)
subject - criteria - Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.