public interface OperationManagerLocal extends OperationManagerRemote
| Modifier and Type | Method and Description |
|---|---|
void |
checkForCompletedGroupOperation(int historyId)
This is, for all intents and purposes, and internal method.
|
void |
checkForTimedOutOperations(org.rhq.core.domain.auth.Subject whoami)
Will check to see if any in progress operation jobs are taking too long to finish and if so marks their histories
as failed.
|
void |
deleteOperationScheduleEntity(org.rhq.core.domain.operation.ScheduleJobId jobId)
This will delete an operation schedule entity identified with the given job ID.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.GroupOperationHistory> |
findCompletedGroupOperationHistories(org.rhq.core.domain.auth.Subject subject,
int groupId,
org.rhq.core.domain.util.PageControl pc)
Returns the list of completed operation histories for the group resource.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.ResourceOperationHistory> |
findCompletedResourceOperationHistories(org.rhq.core.domain.auth.Subject subject,
int resourceId,
Long startDate,
Long endDate,
org.rhq.core.domain.util.PageControl pc)
Returns the list of completed operation histories for the given resource.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.composite.GroupOperationScheduleComposite> |
findCurrentlyScheduledGroupOperations(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.util.PageControl pc)
Gets a list of all currently scheduled group operations (that is, scheduled but not yet invoked and/or
completed).
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.composite.ResourceOperationScheduleComposite> |
findCurrentlyScheduledResourceOperations(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.util.PageControl pc)
Gets a list of all currently scheduled resource operations (that is, scheduled but not yet invoked and/or
completed).
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.GroupOperationHistory> |
findPendingGroupOperationHistories(org.rhq.core.domain.auth.Subject subject,
int groupId,
org.rhq.core.domain.util.PageControl pc)
Returns the list of pending operation histories for the group resource.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.ResourceOperationHistory> |
findPendingResourceOperationHistories(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.util.PageControl pc)
Returns the list of pending operation histories for the given resource.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.composite.GroupOperationLastCompletedComposite> |
findRecentlyCompletedGroupOperations(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.util.PageControl pc)
Gets a list of all recently completed group operations.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.composite.ResourceOperationLastCompletedComposite> |
findRecentlyCompletedResourceOperations(org.rhq.core.domain.auth.Subject subject,
Integer resourceId,
org.rhq.core.domain.util.PageControl pc)
Gets a list of all recently completed resource operations.
|
org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.ResourceOperationHistory> |
findResourceOperationHistoriesByGroupHistoryId(org.rhq.core.domain.auth.Subject subject,
int historyId,
org.rhq.core.domain.util.PageControl pc)
Get the paged resource operation histories for a given group history.
|
List<org.rhq.core.domain.operation.OperationDefinition> |
findSupportedGroupOperations(org.rhq.core.domain.auth.Subject subject,
int compatibleGroupId,
boolean eagerLoaded)
Returns the definitions of all the operations supported by the given group.
|
List<org.rhq.core.domain.operation.OperationDefinition> |
findSupportedResourceOperations(org.rhq.core.domain.auth.Subject subject,
int resourceId,
boolean eagerLoaded)
Returns the definitions of all the operations supported by the given resource.
|
List<org.rhq.core.domain.operation.OperationDefinition> |
findSupportedResourceTypeOperations(org.rhq.core.domain.auth.Subject subject,
int resourceTypeId,
boolean eagerLoaded)
Returns the definitions of all the operations supported by the given resource type.
|
org.rhq.core.domain.operation.bean.GroupOperationSchedule |
getGroupOperationSchedule(org.rhq.core.domain.auth.Subject whoami,
int scheduleId)
TODO
|
org.rhq.core.domain.operation.bean.GroupOperationSchedule |
getGroupOperationSchedule(org.rhq.core.domain.auth.Subject subject,
org.quartz.JobDetail jobDetail)
Given a group operation job's details, this returns a schedule POJO corresponding to that job.
|
org.rhq.core.domain.operation.bean.GroupOperationSchedule |
getGroupOperationSchedule(org.rhq.core.domain.auth.Subject subject,
String jobId)
Given a group job's id, this returns the schedule for that group job.
|
org.rhq.core.domain.operation.ResourceOperationHistory |
getLatestCompletedResourceOperation(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Get the mostly recently run operation for the
Resource with the given id, or null if the
resource has had no operations performed against it yet (or if all previously performed operations have been
deleted from the history). |
org.rhq.core.domain.operation.ResourceOperationHistory |
getOldestInProgressResourceOperation(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Get the oldest operation still in progress for the
Resource with the given id, or null if
the resource has no operations being performed against it. |
org.rhq.core.domain.operation.OperationDefinition |
getOperationDefinition(org.rhq.core.domain.auth.Subject subject,
int operationId)
Get the OperationDefinition object that corresponds to this operationId
|
org.rhq.core.domain.operation.OperationDefinition |
getOperationDefinitionByResourceTypeAndName(int resourceTypeId,
String operationName,
boolean eagerLoaded) |
org.rhq.core.domain.operation.OperationHistory |
getOperationHistoryByHistoryId(org.rhq.core.domain.auth.Subject subject,
int historyId)
TODO
|
org.rhq.core.domain.operation.OperationHistory |
getOperationHistoryByJobId(org.rhq.core.domain.auth.Subject subject,
String historyJobId)
TODO
|
List<org.rhq.core.domain.common.composite.IntegerOptionItem> |
getResourceNameOptionItems(int groupId)
TODO
|
org.rhq.core.domain.operation.bean.ResourceOperationSchedule |
getResourceOperationSchedule(org.rhq.core.domain.auth.Subject whoami,
int scheduleId)
TODO
|
org.rhq.core.domain.operation.bean.ResourceOperationSchedule |
getResourceOperationSchedule(org.rhq.core.domain.auth.Subject subject,
org.quartz.JobDetail jobDetail)
Given a Resource operation job's details, this returns a schedule POJO corresponding to that job.
|
org.rhq.core.domain.operation.bean.ResourceOperationSchedule |
getResourceOperationSchedule(org.rhq.core.domain.auth.Subject subject,
String jobId)
Given a resource job's id, this returns the schedule for that resource job.
|
org.rhq.core.domain.operation.OperationDefinition |
getSupportedGroupOperation(org.rhq.core.domain.auth.Subject subject,
int compatibleGroupId,
String operationName,
boolean eagerLoaded)
Returns the definition of the named operation supported by the given group.
|
org.rhq.core.domain.operation.OperationDefinition |
getSupportedResourceOperation(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String operationName,
boolean eagerLoaded)
Returns the definition of the named operation supported by the given resource.
|
boolean |
isGroupOperationSupported(org.rhq.core.domain.auth.Subject subject,
int resourceGroupId)
Determines if the given group has at least one operation.
|
boolean |
isResourceOperationSupported(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Determines if the given resource has at least one operation.
|
int |
purgeOperationHistory(Date purgeBeforeTime)
Purge all operation history created before the specified time.
|
int |
purgeOperationHistoryInNewTransaction(Date purgeBeforeTime,
boolean isGroupPurge,
int limit)
This does the work of
purgeOperationHistory(Date), targeting group or resource history, and
limits transaction size by applying a limit to the number of history records purged. |
int |
scheduleGroupOperation(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.operation.bean.GroupOperationSchedule schedule)
Schedules a Resource group operation for execution.
|
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,
org.quartz.Trigger trigger,
String description)
Schedules an operation for execution on members of the given group.
|
org.rhq.core.domain.operation.bean.ResourceOperationSchedule |
scheduleResourceOperation(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String operationName,
org.rhq.core.domain.configuration.Configuration parameters,
org.quartz.Trigger trigger,
String description)
Schedules an operation for execution on the given resource.
|
int |
scheduleResourceOperation(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.operation.bean.ResourceOperationSchedule schedule)
Schedules a Resource operation for execution.
|
org.rhq.core.domain.operation.OperationHistory |
updateOperationHistory(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.operation.OperationHistory history)
This is called by the jobs so they can update the history.
|
void |
updateOperationScheduleEntity(org.rhq.core.domain.operation.ScheduleJobId jobId,
long nextFireTime)
This allows you to update an operation schedule entity with a new next-fire-time.
|
cancelOperationHistory, deleteOperationHistories, deleteOperationHistory, findGroupOperationHistoriesByCriteria, findOperationDefinitionsByCriteria, findResourceOperationHistoriesByCriteria, findScheduledGroupOperations, findScheduledResourceOperations, scheduleGroupOperation, scheduleGroupOperationUsingCron, scheduleResourceOperation, scheduleResourceOperationUsingCron, unscheduleGroupOperation, unscheduleResourceOperationList<org.rhq.core.domain.common.composite.IntegerOptionItem> getResourceNameOptionItems(int groupId)
groupId - int scheduleResourceOperation(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.operation.bean.ResourceOperationSchedule schedule)
subject - the user who is asking to schedule the jobschedule - the information describing the operation to be scheduled along with the schedule to be usedResourceOperationScheduleEntity created to track the
scheduled operationint scheduleGroupOperation(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.operation.bean.GroupOperationSchedule schedule)
throws ScheduleException
subject - the user who is asking to schedule the jobschedule - the information describing the operation to be scheduled along with the schedule to be usedGroupOperationScheduleEntity created to track the
scheduled operationScheduleExceptionorg.rhq.core.domain.operation.bean.ResourceOperationSchedule scheduleResourceOperation(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String operationName,
org.rhq.core.domain.configuration.Configuration parameters,
org.quartz.Trigger trigger,
String description)
throws org.quartz.SchedulerException
subject - the user who is asking to schedule the jobresourceId - the resource that is the target of the operationoperationName - the actual operation to invokeparameters - optional parameters to pass into the operationtrigger - the schedule of when the job runs (the names and group names in this trigger are ignored
and reset by this method)description - user-entered description of the job to be scheduledorg.quartz.SchedulerException - if failed to schedule the operationorg.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,
org.quartz.Trigger trigger,
String description)
throws org.quartz.SchedulerException
subject - the user who is asking to schedule the jobgroupId - the group whose member resources are the target of the operationexecutionOrderResourceIds - optional order of exection - 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 operationtrigger - the schedule of when the job runs (the names and group names in this trigger
are ignored and reset by this method)description - user-entered description of the job to be scheduledorg.quartz.SchedulerException - if failed to schedule the operationorg.rhq.core.domain.operation.bean.ResourceOperationSchedule getResourceOperationSchedule(org.rhq.core.domain.auth.Subject whoami,
int scheduleId)
whoami - scheduleId - org.rhq.core.domain.operation.bean.GroupOperationSchedule getGroupOperationSchedule(org.rhq.core.domain.auth.Subject whoami,
int scheduleId)
whoami - scheduleId - void deleteOperationScheduleEntity(org.rhq.core.domain.operation.ScheduleJobId jobId)
This method is really just for the OperationJob objects to clean out the schedule tracking entity when
the schedule has run its course and will no longer be triggered. The UI or other pieces of client code will
usually not have to ever use this method; if you are thinking about having a need to call this method, please
know what you are doing.
jobId - void updateOperationScheduleEntity(org.rhq.core.domain.operation.ScheduleJobId jobId,
long nextFireTime)
This method is really just for the OperationJob objects to update the schedule tracking entity. The UI
or other pieces of client code will usually not have to ever use this method; if you are thinking about having a
need to call this method, please know what you are doing.
jobId - nextFireTime - the next time this job is due to be triggered@Nullable
org.rhq.core.domain.operation.bean.ResourceOperationSchedule getResourceOperationSchedule(org.rhq.core.domain.auth.Subject subject,
org.quartz.JobDetail jobDetail)
subject - jobDetail - org.rhq.core.domain.operation.bean.ResourceOperationSchedule getResourceOperationSchedule(org.rhq.core.domain.auth.Subject subject,
String jobId)
throws org.quartz.SchedulerException
subject - jobId - org.quartz.SchedulerException - if failed to find the schedule@Nullable
org.rhq.core.domain.operation.bean.GroupOperationSchedule getGroupOperationSchedule(org.rhq.core.domain.auth.Subject subject,
org.quartz.JobDetail jobDetail)
subject - jobDetail - org.rhq.core.domain.operation.bean.GroupOperationSchedule getGroupOperationSchedule(org.rhq.core.domain.auth.Subject subject,
String jobId)
throws org.quartz.SchedulerException
subject - jobId - org.quartz.SchedulerException - if failed to find the scheduleorg.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.ResourceOperationHistory> findResourceOperationHistoriesByGroupHistoryId(org.rhq.core.domain.auth.Subject subject,
int historyId,
org.rhq.core.domain.util.PageControl pc)
subject - the user that wants to see the historyhistoryId - ID of the history to retrievepc - the page control used for sorting and paging of resultsorg.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.GroupOperationHistory> findCompletedGroupOperationHistories(org.rhq.core.domain.auth.Subject subject,
int groupId,
org.rhq.core.domain.util.PageControl pc)
findCompletedResourceOperationHistories(Subject, int, Long, Long, PageControl) for that.subject - groupId - pc - org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.GroupOperationHistory> findPendingGroupOperationHistories(org.rhq.core.domain.auth.Subject subject,
int groupId,
org.rhq.core.domain.util.PageControl pc)
findPendingResourceOperationHistories(Subject, int, PageControl) for that.subject - groupId - pc - org.rhq.core.domain.operation.OperationHistory updateOperationHistory(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.operation.OperationHistory history)
Every call to this method will trigger at least one check against the AlertConditionCacheManager. The first is against the passed history element itself, which captures the creation events (history element will be in the INPROGRESS state), as well as updated to ResourceOperationHistory elements (completed, failed, etc).
Furthermore, since ResourceOperationHistory elements are reused for execution of group operations, this method also checks to see if it is part of a larger group operation. If it is, and if it is the last member of that group to finish, the group status will be updated. This will trigger a second check against the AlertConditionCacheManager using that corresponding group history element.
subject - the user that the job is executing underhistory - the history with the data to be updated. The history record will be created if id is set to 0.
Otherwise the record must already exist and will be updated.void checkForCompletedGroupOperation(int historyId)
historyId - the integer id of the OperationHistory entity that needs to be checkedList<org.rhq.core.domain.operation.OperationDefinition> findSupportedResourceTypeOperations(org.rhq.core.domain.auth.Subject subject, int resourceTypeId, boolean eagerLoaded)
subject - resourceTypeId - eagerLoaded - if true the parametersConfigurationDefinition, resultsConfigurationDefinition, and
resourceType fields are eagerly loaded, otherwise they are left as null referencesList<org.rhq.core.domain.operation.OperationDefinition> findSupportedGroupOperations(org.rhq.core.domain.auth.Subject subject, int compatibleGroupId, boolean eagerLoaded)
subject - compatibleGroupId - eagerLoaded - if true the parametersConfigurationDefinition, resultsConfigurationDefinition, and
resourceType fields are eagerly loaded, otherwise they are left as null referencesorg.rhq.core.domain.operation.OperationDefinition getSupportedResourceOperation(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String operationName,
boolean eagerLoaded)
subject - resourceId - operationName - eagerLoaded - if true the parametersConfigurationDefinition, resultsConfigurationDefinition, and
resourceType fields are eagerly loaded, otherwise they are left as null referencesorg.rhq.core.domain.operation.OperationDefinition getSupportedGroupOperation(org.rhq.core.domain.auth.Subject subject,
int compatibleGroupId,
String operationName,
boolean eagerLoaded)
subject - compatibleGroupId - operationName - eagerLoaded - if true the parametersConfigurationDefinition, resultsConfigurationDefinition, and
resourceType fields are eagerly loaded, otherwise they are left as null referencesboolean isResourceOperationSupported(org.rhq.core.domain.auth.Subject subject,
int resourceId)
subject - resourceId - true if the resource has at least one operationboolean isGroupOperationSupported(org.rhq.core.domain.auth.Subject subject,
int resourceGroupId)
subject - resourceGroupId - true if the group has at least one operationvoid checkForTimedOutOperations(org.rhq.core.domain.auth.Subject whoami)
Calls to this method could trigger a number of checks against the AlertConditionCacheManager. The first set of checks would be against any and all resource operations that have timed out. Then, for any of these timeouts, since ResourceOperationHistory elements are reused for execution of group operations, this method also checks to see if it is part of a larger group operation. If it is, and if it is the last member of that group to finish, the group status will be updated. This will trigger another check against the AlertConditionCacheManager using that corresponding group history element.
whoami - only the overlord may execute this system operation@Nullable
org.rhq.core.domain.operation.ResourceOperationHistory getLatestCompletedResourceOperation(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Resource with the given id, or null if the
resource has had no operations performed against it yet (or if all previously performed operations have been
deleted from the history). Returns the result of the operation as it is known on the server-side in the database.subject - the user who wants to see the informationresourceId - a Resource idResource with the given id, or null
if the resource has had no operations performed against it yet.@Nullable
org.rhq.core.domain.operation.ResourceOperationHistory getOldestInProgressResourceOperation(org.rhq.core.domain.auth.Subject subject,
int resourceId)
Resource with the given id, or null if
the resource has no operations being performed against it. Returns the INPROCESS element with empty results.subject - the user who wants to see the informationresourceId - a Resource idResource with the given id, or null
if the resource has no operations being performed against it.org.rhq.core.domain.operation.OperationDefinition getOperationDefinition(org.rhq.core.domain.auth.Subject subject,
int operationId)
subject - the user who wants to see the informationoperationId - org.rhq.core.domain.operation.OperationDefinition getOperationDefinitionByResourceTypeAndName(int resourceTypeId,
String operationName,
boolean eagerLoaded)
throws OperationDefinitionNotFoundException
resourceTypeId - operationName - eagerLoaded - if true the parametersConfigurationDefinition, resultsConfigurationDefinition, and
resourceType fields are eagerly loaded, otherwise they are left as null referencesOperationDefinitionNotFoundExceptionorg.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.composite.ResourceOperationLastCompletedComposite> findRecentlyCompletedResourceOperations(org.rhq.core.domain.auth.Subject subject,
Integer resourceId,
org.rhq.core.domain.util.PageControl pc)
Only resource operations are returned (group operations are ignored by this method). However, if a group operation was executed, all of the resource executions that occurred as part of it will be returned (that is, the resources in that group will have its resource operations returned.
subject - the user asking for the data; the returned list is limited to what this user can seeresourceId - if non-null, will only result recent completed operations for this resourcepc - limits the number of composite objects returnedorg.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.composite.GroupOperationLastCompletedComposite> findRecentlyCompletedGroupOperations(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.util.PageControl pc)
subject - the user asking for the data; the returned list is limited to what this user can seepc - limits the number of composite objects returnedorg.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.composite.ResourceOperationScheduleComposite> findCurrentlyScheduledResourceOperations(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.util.PageControl pc)
subject - the user asking for the data; the returned list is limited to what this user can seepc - limits the number of composite objects returnedorg.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.composite.GroupOperationScheduleComposite> findCurrentlyScheduledGroupOperations(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.util.PageControl pc)
subject - the user asking for the data; the returned list is limited to what this user can seepc - limits the number of composite objects returnedorg.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.ResourceOperationHistory> findCompletedResourceOperationHistories(org.rhq.core.domain.auth.Subject subject,
int resourceId,
Long startDate,
Long endDate,
org.rhq.core.domain.util.PageControl pc)
subject - resourceId - startDate - filter used to show only results occurring after this epoch millis parameter, nullableendDate - filter used to show only results occurring before this epoch millis parameter, nullablepc - org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.ResourceOperationHistory> findPendingResourceOperationHistories(org.rhq.core.domain.auth.Subject subject,
int resourceId,
org.rhq.core.domain.util.PageControl pc)
subject - resourceId - pc - org.rhq.core.domain.operation.OperationHistory getOperationHistoryByHistoryId(org.rhq.core.domain.auth.Subject subject,
int historyId)
org.rhq.core.domain.operation.OperationHistory getOperationHistoryByJobId(org.rhq.core.domain.auth.Subject subject,
String historyJobId)
List<org.rhq.core.domain.operation.OperationDefinition> findSupportedResourceOperations(org.rhq.core.domain.auth.Subject subject, int resourceId, boolean eagerLoaded)
subject - resourceId - eagerLoaded - if true the parametersConfigurationDefinition, resultsConfigurationDefinition, and
resourceType fields are eagerly loaded, otherwise they are left as null referencesint purgeOperationHistory(Date purgeBeforeTime)
purgeBeforeTime - int purgeOperationHistoryInNewTransaction(Date purgeBeforeTime, boolean isGroupPurge, int limit)
purgeOperationHistory(Date), targeting group or resource history, and
limits transaction size by applying a limit to the number of history records purged. The records purged
are not done in any order, any history meeting the purgeBeforeTime constraint is eligible.purgeBeforeTime - isGroupPurge - limit - Copyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.