|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rhq.core.domain.operation.OperationHistory
public abstract class OperationHistory
The entity that represents an operation invocation that is either in progress or has completed. This is the superclass to both the the individual resource history object (that encapsulates the results) and the group history object (for group invocations across multiple resources).
Field Summary | |
---|---|
static String |
QUERY_DELETE_BY_DEFINITION
|
static String |
QUERY_DELETE_BY_HISTORY_IDS
|
static String |
QUERY_FIND_BY_JOB_ID
|
static String |
QUERY_GET_PARAMETER_CONFIGURATION_IDS
|
static String |
QUERY_GET_RECENTLY_COMPLETED_GROUP
|
static String |
QUERY_GET_RECENTLY_COMPLETED_GROUP_ADMIN
|
static String |
QUERY_GET_RECENTLY_COMPLETED_RESOURCE
|
static String |
QUERY_GET_RECENTLY_COMPLETED_RESOURCE_ADMIN
|
static String |
QUERY_GET_RESULT_CONFIGURATION_IDS
|
Constructor Summary | |
---|---|
protected |
OperationHistory()
|
protected |
OperationHistory(String jobName,
String jobGroup,
String subjectName,
OperationDefinition operationDefinition,
Configuration parameters)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
long |
getCreatedTime()
The time this entity was originally created. |
long |
getDuration()
The duration of the operation invocation which simply is the difference between the getCreatedTime() and
the getModifiedTime() . |
String |
getErrorMessage()
If not null , this is an error message (possibly a full stack trace) to indicate the overall error
that occurred when the operation failed. |
int |
getId()
|
String |
getJobGroup()
|
HistoryJobId |
getJobId()
The single job ID which identifies this specific history item. |
String |
getJobName()
|
long |
getModifiedTime()
The time this entity was last modified. |
OperationDefinition |
getOperationDefinition()
|
Configuration |
getParameters()
|
long |
getStartedTime()
The time when corresponding operation was started. |
OperationRequestStatus |
getStatus()
The status of the operation which indicates that the invocation is either still in progress, or it has completed and either succeeded or failed. |
String |
getSubjectName()
For auditing purposes, this method tells you the username of the person that invoked the operation. |
int |
hashCode()
|
void |
setErrorMessage(String errorMessage)
Calling this method with a non- null error message implies that the request's status is
OperationRequestStatus.FAILURE . |
void |
setId(int id)
|
void |
setJobGroup(String jobGroup)
|
void |
setJobName(String jobName)
|
void |
setOperationDefinition(OperationDefinition operationDefinition)
|
void |
setParameters(Configuration parameters)
|
void |
setStartedTime()
This method MUST be called when the corresponding operation is triggered, but before the request is sent down to the agent. |
void |
setStatus(OperationRequestStatus status)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String QUERY_FIND_BY_JOB_ID
public static final String QUERY_GET_RECENTLY_COMPLETED_RESOURCE
public static final String QUERY_GET_RECENTLY_COMPLETED_RESOURCE_ADMIN
public static final String QUERY_GET_RECENTLY_COMPLETED_GROUP
public static final String QUERY_GET_RECENTLY_COMPLETED_GROUP_ADMIN
public static final String QUERY_GET_PARAMETER_CONFIGURATION_IDS
public static final String QUERY_GET_RESULT_CONFIGURATION_IDS
public static final String QUERY_DELETE_BY_HISTORY_IDS
public static final String QUERY_DELETE_BY_DEFINITION
Constructor Detail |
---|
protected OperationHistory()
protected OperationHistory(String jobName, String jobGroup, String subjectName, OperationDefinition operationDefinition, Configuration parameters)
Method Detail |
---|
public HistoryJobId getJobId()
HistoryJobId.HistoryJobId(String)
.
public int getId()
public void setId(int id)
public String getJobName()
public void setJobName(String jobName)
public String getJobGroup()
public void setJobGroup(String jobGroup)
public OperationDefinition getOperationDefinition()
public void setOperationDefinition(OperationDefinition operationDefinition)
public Configuration getParameters()
public void setParameters(Configuration parameters)
public OperationRequestStatus getStatus()
null
if the job hasn't even been triggered yet.
public void setStatus(OperationRequestStatus status)
public String getErrorMessage()
null
, this is an error message (possibly a full stack trace) to indicate the overall error
that occurred when the operation failed. This will normally be null
unless the
status
indicates a OperationRequestStatus.FAILURE
.
public void setErrorMessage(String errorMessage)
null
error message implies that the request's status is
OperationRequestStatus.FAILURE
. The inverse is not true - that is, if you set the error message to
null
, the status is left as-is; it will not assume that a null
error message means the
status is successful.
errorMessage
- public String getSubjectName()
public long getCreatedTime()
getStartedTime()
value. If this is an operation on a single resource, then these two figures
will be very similar because resource operations are started immediately after the history element is created
for them. If this is an operation on a resource group, especially a large group, then these two figures might
diverge considerably because all history elements are created up front, and then the process begins executing
each in turn.
getStartedTime()
public long getModifiedTime()
created time
.
public void setStartedTime()
getDuration()
, which is in turn used by the
business layer to reason whether an operation has timed out. If this method is never called, and if there are
any issues executing the corresponding operation, this history element will never time out and will forever stay
in the OperationRequestStatus.INPROGRESS
state.
IllegalArgumentException
- if an attempt is made to start this object more than oncegetCreatedTime()
public long getStartedTime()
public long getDuration()
getCreatedTime()
and
the getModifiedTime()
. If the operation hasn't completed yet, this will be the difference between the
current time and the created time.
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |