|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.enterprise.server.operation.OperationManagerBean
public class OperationManagerBean
| Constructor Summary | |
|---|---|
OperationManagerBean()
|
|
| Method Summary | |
|---|---|
void |
cancelOperationHistory(org.rhq.core.domain.auth.Subject subject,
int historyId,
boolean ignoreAgentErrors)
Cancels a currently in-progress operation. |
void |
checkForCompletedGroupOperation(int historyId)
Given the id of a history object, this will see if it has completed and if it is a resource history that is part of an overall group operation and if so will see if all of its peer resource histories are also complete. |
void |
checkForTimedOutOperations(org.rhq.core.domain.auth.Subject subject)
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 |
deleteOperationHistory(org.rhq.core.domain.auth.Subject subject,
int historyId,
boolean purgeInProgress)
Purges the history from the database. |
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 beginDate,
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 pageControl)
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 pageControl)
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> |
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.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 pageControl)
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 pageControl)
Gets a list of all recently completed resource operations. |
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)
|
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.bean.GroupOperationSchedule> |
findScheduledGroupOperations(org.rhq.core.domain.auth.Subject subject,
int groupId)
Returns the list of schedules for the group itself. |
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. |
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 whoami,
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 |
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,
long delay,
long repeatInterval,
int repeatCount,
int timeout,
String description)
#see {@link OperationManagerRemote#scheduleGroupOperation |
org.rhq.core.domain.operation.bean.GroupOperationSchedule |
scheduleGroupOperation(org.rhq.core.domain.auth.Subject subject,
int compatibleGroupId,
int[] executionOrderResourceIds,
boolean haltOnFailure,
String operationName,
org.rhq.core.domain.configuration.Configuration parameters,
org.quartz.Trigger trigger,
String notes)
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 notes)
Schedules an operation for execution on the given resource. |
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 notes)
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. |
void |
unscheduleGroupOperation(org.rhq.core.domain.auth.Subject subject,
String jobId,
int resourceGroupId)
see OperationManagerRemote.unscheduleGroupOperation(org.rhq.core.domain.auth.Subject, String, int) |
void |
unscheduleResourceOperation(org.rhq.core.domain.auth.Subject subject,
String jobId,
int resourceId)
Unschedules the resource operation identified with the given job ID. |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OperationManagerBean()
| Method Detail |
|---|
public List<org.rhq.core.domain.common.composite.IntegerOptionItem> getResourceNameOptionItems(int groupId)
OperationManagerLocal
getResourceNameOptionItems in interface OperationManagerLocal
public 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 notes)
throws ScheduleException
OperationManagerLocal
scheduleResourceOperation in interface OperationManagerLocalscheduleResourceOperation in interface OperationManagerRemotesubject - 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.notes - user-entered description of the job to be scheduled
ScheduleException - TODO
public int scheduleResourceOperation(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.operation.bean.ResourceOperationSchedule schedule)
throws ScheduleException
OperationManagerLocal
scheduleResourceOperation in interface OperationManagerLocalsubject - the user who is asking to schedule the jobschedule - the information describing the operation to be scheduled along with the schedule to be used
ResourceOperationScheduleEntity created to track the
scheduled operation
ScheduleException
public int scheduleGroupOperation(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.operation.bean.GroupOperationSchedule schedule)
throws ScheduleException
OperationManagerLocal
scheduleGroupOperation in interface OperationManagerLocalsubject - the user who is asking to schedule the jobschedule - the information describing the operation to be scheduled along with the schedule to be used
GroupOperationScheduleEntity created to track the
scheduled operation
ScheduleException
public 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 notes)
throws org.quartz.SchedulerException
OperationManagerLocal
scheduleResourceOperation in interface OperationManagerLocalsubject - 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)notes - user-entered description of the job to be scheduled
org.quartz.SchedulerException - if failed to schedule the operation
public org.rhq.core.domain.operation.bean.GroupOperationSchedule scheduleGroupOperation(org.rhq.core.domain.auth.Subject subject,
int compatibleGroupId,
int[] executionOrderResourceIds,
boolean haltOnFailure,
String operationName,
org.rhq.core.domain.configuration.Configuration parameters,
org.quartz.Trigger trigger,
String notes)
throws org.quartz.SchedulerException
OperationManagerLocal
scheduleGroupOperation in interface OperationManagerLocalsubject - the user who is asking to schedule the jobcompatibleGroupId - 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)notes - user-entered description of the job to be scheduled
org.quartz.SchedulerException - if failed to schedule the operation
public void unscheduleResourceOperation(org.rhq.core.domain.auth.Subject subject,
String jobId,
int resourceId)
throws UnscheduleException
OperationManagerLocal
unscheduleResourceOperation in interface OperationManagerLocalunscheduleResourceOperation in interface OperationManagerRemotesubject - the user who is asking to unschedule the operationjobId - identifies the operation to unscheduleresourceId - the ID of the resource whose operation is getting unscheduled
UnscheduleException - TODO
public void unscheduleGroupOperation(org.rhq.core.domain.auth.Subject subject,
String jobId,
int resourceGroupId)
throws UnscheduleException
OperationManagerLocalOperationManagerRemote.unscheduleGroupOperation(org.rhq.core.domain.auth.Subject, String, int)
unscheduleGroupOperation in interface OperationManagerLocalunscheduleGroupOperation in interface OperationManagerRemotesubject - the user who is asking to unschedule the operationjobId - identifies the operation to unscheduleresourceGroupId - the ID of the group whose operation is getting unscheduled
UnscheduleException - TODOpublic void deleteOperationScheduleEntity(org.rhq.core.domain.operation.ScheduleJobId jobId)
OperationManagerLocalThis 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.
deleteOperationScheduleEntity in interface OperationManagerLocal
public void updateOperationScheduleEntity(org.rhq.core.domain.operation.ScheduleJobId jobId,
long nextFireTime)
OperationManagerLocalThis 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.
updateOperationScheduleEntity in interface OperationManagerLocalnextFireTime - the next time this job is due to be triggered
public List<org.rhq.core.domain.operation.bean.ResourceOperationSchedule> findScheduledResourceOperations(org.rhq.core.domain.auth.Subject subject,
int resourceId)
throws Exception
OperationManagerLocal
findScheduledResourceOperations in interface OperationManagerLocalfindScheduledResourceOperations in interface OperationManagerRemoteException - TODO
public List<org.rhq.core.domain.operation.bean.GroupOperationSchedule> findScheduledGroupOperations(org.rhq.core.domain.auth.Subject subject,
int groupId)
throws Exception
OperationManagerLocal
findScheduledGroupOperations in interface OperationManagerLocalfindScheduledGroupOperations in interface OperationManagerRemoteException - TODO
public org.rhq.core.domain.operation.bean.ResourceOperationSchedule getResourceOperationSchedule(org.rhq.core.domain.auth.Subject whoami,
int scheduleId)
OperationManagerLocal
getResourceOperationSchedule in interface OperationManagerLocal
public org.rhq.core.domain.operation.bean.GroupOperationSchedule getGroupOperationSchedule(org.rhq.core.domain.auth.Subject whoami,
int scheduleId)
OperationManagerLocal
getGroupOperationSchedule in interface OperationManagerLocal
public org.rhq.core.domain.operation.bean.ResourceOperationSchedule getResourceOperationSchedule(org.rhq.core.domain.auth.Subject whoami,
org.quartz.JobDetail jobDetail)
OperationManagerLocal
getResourceOperationSchedule in interface OperationManagerLocal
public org.rhq.core.domain.operation.bean.ResourceOperationSchedule getResourceOperationSchedule(org.rhq.core.domain.auth.Subject subject,
String jobId)
throws org.quartz.SchedulerException
OperationManagerLocal
getResourceOperationSchedule in interface OperationManagerLocalorg.quartz.SchedulerException - if failed to find the schedule
public org.rhq.core.domain.operation.bean.GroupOperationSchedule getGroupOperationSchedule(org.rhq.core.domain.auth.Subject subject,
org.quartz.JobDetail jobDetail)
OperationManagerLocal
getGroupOperationSchedule in interface OperationManagerLocal
public org.rhq.core.domain.operation.bean.GroupOperationSchedule getGroupOperationSchedule(org.rhq.core.domain.auth.Subject subject,
String jobId)
throws org.quartz.SchedulerException
OperationManagerLocal
getGroupOperationSchedule in interface OperationManagerLocalorg.quartz.SchedulerException - if failed to find the schedule
public org.rhq.core.domain.operation.OperationHistory getOperationHistoryByHistoryId(org.rhq.core.domain.auth.Subject subject,
int historyId)
OperationManagerLocal
getOperationHistoryByHistoryId in interface OperationManagerLocal
public 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)
OperationManagerLocal
findResourceOperationHistoriesByGroupHistoryId in interface OperationManagerLocalsubject - the user that wants to see the historyhistoryId - ID of the history to retrievepc - the page control used for sorting and paging of results
public org.rhq.core.domain.operation.OperationHistory getOperationHistoryByJobId(org.rhq.core.domain.auth.Subject subject,
String historyJobId)
OperationManagerLocal
getOperationHistoryByJobId in interface OperationManagerLocal
public org.rhq.core.domain.util.PageList<org.rhq.core.domain.operation.ResourceOperationHistory> findCompletedResourceOperationHistories(org.rhq.core.domain.auth.Subject subject,
int resourceId,
Long beginDate,
Long endDate,
org.rhq.core.domain.util.PageControl pc)
OperationManagerLocal
findCompletedResourceOperationHistories in interface OperationManagerLocalbeginDate - 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, nullable
public 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)
OperationManagerLocal
findPendingResourceOperationHistories in interface OperationManagerLocal
public 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)
OperationManagerLocalOperationManagerLocal.findCompletedResourceOperationHistories(Subject, int, Long, Long, PageControl) for that.
findCompletedGroupOperationHistories in interface OperationManagerLocal
public 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)
OperationManagerLocalOperationManagerLocal.findPendingResourceOperationHistories(Subject, int, PageControl) for that.
findPendingGroupOperationHistories in interface OperationManagerLocal
public org.rhq.core.domain.operation.OperationHistory updateOperationHistory(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.operation.OperationHistory history)
OperationManagerLocalEvery 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.
updateOperationHistory in interface OperationManagerLocalsubject - the user that the job is executing underhistory - the history with the data to be updated
public void cancelOperationHistory(org.rhq.core.domain.auth.Subject subject,
int historyId,
boolean ignoreAgentErrors)
OperationManagerLocalNote 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.
cancelOperationHistory in interface OperationManagerLocalcancelOperationHistory in interface OperationManagerRemotesubject - the user that wants to cancel the 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.
public void deleteOperationHistory(org.rhq.core.domain.auth.Subject subject,
int historyId,
boolean purgeInProgress)
OperationManagerLocalNote that this method will handle deleting a resource or group history - depending on what the given
historyId refers to.
deleteOperationHistory in interface OperationManagerLocaldeleteOperationHistory in interface OperationManagerRemotesubject - the user that wants to delete the historyhistoryId - 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 true
public List<org.rhq.core.domain.operation.OperationDefinition> findSupportedResourceOperations(org.rhq.core.domain.auth.Subject subject,
int resourceId,
boolean eagerLoaded)
OperationManagerLocal
findSupportedResourceOperations in interface OperationManagerLocaleagerLoaded - if true the parametersConfigurationDefinition, resultsConfigurationDefinition, and
resourceType fields are eagerly loaded, otherwise they are left as null references
public List<org.rhq.core.domain.operation.OperationDefinition> findSupportedResourceTypeOperations(org.rhq.core.domain.auth.Subject subject,
int resourceTypeId,
boolean eagerLoaded)
OperationManagerLocal
findSupportedResourceTypeOperations in interface OperationManagerLocaleagerLoaded - if true the parametersConfigurationDefinition, resultsConfigurationDefinition, and
resourceType fields are eagerly loaded, otherwise they are left as null references
public List<org.rhq.core.domain.operation.OperationDefinition> findSupportedGroupOperations(org.rhq.core.domain.auth.Subject subject,
int compatibleGroupId,
boolean eagerLoaded)
OperationManagerLocal
findSupportedGroupOperations in interface OperationManagerLocaleagerLoaded - if true the parametersConfigurationDefinition, resultsConfigurationDefinition, and
resourceType fields are eagerly loaded, otherwise they are left as null references
public org.rhq.core.domain.operation.OperationDefinition getSupportedResourceOperation(org.rhq.core.domain.auth.Subject subject,
int resourceId,
String operationName,
boolean eagerLoaded)
OperationManagerLocal
getSupportedResourceOperation in interface OperationManagerLocaleagerLoaded - if true the parametersConfigurationDefinition, resultsConfigurationDefinition, and
resourceType fields are eagerly loaded, otherwise they are left as null references
public org.rhq.core.domain.operation.OperationDefinition getSupportedGroupOperation(org.rhq.core.domain.auth.Subject subject,
int compatibleGroupId,
String operationName,
boolean eagerLoaded)
OperationManagerLocal
getSupportedGroupOperation in interface OperationManagerLocaleagerLoaded - if true the parametersConfigurationDefinition, resultsConfigurationDefinition, and
resourceType fields are eagerly loaded, otherwise they are left as null references
public boolean isResourceOperationSupported(org.rhq.core.domain.auth.Subject subject,
int resourceId)
OperationManagerLocal
isResourceOperationSupported in interface OperationManagerLocaltrue if the resource has at least one operation
public boolean isGroupOperationSupported(org.rhq.core.domain.auth.Subject subject,
int resourceGroupId)
OperationManagerLocal
isGroupOperationSupported in interface OperationManagerLocaltrue if the group has at least one operationpublic void checkForTimedOutOperations(org.rhq.core.domain.auth.Subject subject)
OperationManagerLocalCalls 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.
checkForTimedOutOperations in interface OperationManagerLocalsubject - only the overlord may execute this system operation
public 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 pageControl)
OperationManagerLocalOnly 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.
findRecentlyCompletedResourceOperations in interface OperationManagerLocalsubject - 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 resourcepageControl - limits the number of composite objects returned
public 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 pageControl)
OperationManagerLocal
findRecentlyCompletedGroupOperations in interface OperationManagerLocalsubject - the user asking for the data; the returned list is limited to what this user can seepageControl - limits the number of composite objects returned
public 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 pageControl)
OperationManagerLocal
findCurrentlyScheduledResourceOperations in interface OperationManagerLocalsubject - the user asking for the data; the returned list is limited to what this user can seepageControl - limits the number of composite objects returned
public 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 pageControl)
OperationManagerLocal
findCurrentlyScheduledGroupOperations in interface OperationManagerLocalsubject - the user asking for the data; the returned list is limited to what this user can seepageControl - limits the number of composite objects returned
public void checkForCompletedGroupOperation(int historyId)
checkForCompletedGroupOperation in interface OperationManagerLocalhistoryId - id of a history object
@Nullable
public org.rhq.core.domain.operation.ResourceOperationHistory getLatestCompletedResourceOperation(org.rhq.core.domain.auth.Subject subject,
int resourceId)
OperationManagerLocalResource 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.
getLatestCompletedResourceOperation in interface OperationManagerLocalsubject - the user who wants to see the informationresourceId - a Resource id
Resource with the given id, or null
if the resource has had no operations performed against it yet.
@Nullable
public org.rhq.core.domain.operation.ResourceOperationHistory getOldestInProgressResourceOperation(org.rhq.core.domain.auth.Subject subject,
int resourceId)
OperationManagerLocalResource with the given id, or null if
the resource has no operations being performed against it. Returns the INPROCESS element with empty results.
getOldestInProgressResourceOperation in interface OperationManagerLocalsubject - the user who wants to see the informationresourceId - a Resource id
Resource with the given id, or null
if the resource has no operations being performed against it.
public org.rhq.core.domain.operation.OperationDefinition getOperationDefinition(org.rhq.core.domain.auth.Subject subject,
int operationId)
OperationManagerLocal
getOperationDefinition in interface OperationManagerLocalsubject - the user who wants to see the information
public org.rhq.core.domain.operation.OperationDefinition getOperationDefinitionByResourceTypeAndName(int resourceTypeId,
String operationName,
boolean eagerLoaded)
throws OperationDefinitionNotFoundException
getOperationDefinitionByResourceTypeAndName in interface OperationManagerLocaleagerLoaded - if true the parametersConfigurationDefinition, resultsConfigurationDefinition, and
resourceType fields are eagerly loaded, otherwise they are left as null references
OperationDefinitionNotFoundException
public 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)
throws ScheduleException
OperationManagerLocal
scheduleGroupOperation in interface OperationManagerLocalscheduleGroupOperation in interface OperationManagerRemoteScheduleException
public List<org.rhq.core.domain.operation.OperationDefinition> findOperationDefinitionsByCriteria(org.rhq.core.domain.auth.Subject subject,
org.rhq.core.domain.criteria.OperationDefinitionCriteria criteria)
findOperationDefinitionsByCriteria in interface OperationManagerLocalfindOperationDefinitionsByCriteria in interface OperationManagerRemote
public 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)
findResourceOperationHistoriesByCriteria in interface OperationManagerLocalfindResourceOperationHistoriesByCriteria in interface OperationManagerRemote
public 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)
findGroupOperationHistoriesByCriteria in interface OperationManagerLocalfindGroupOperationHistoriesByCriteria in interface OperationManagerRemote
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||