public class HostRoleCommand extends Object
ActionDBAccessor
, it should not
hold references to JPA entities. It's possible that by holding onto JPA
entities, they will inadvertently hold onto the entire cache of entities in
the L1 cache.Constructor and Description |
---|
HostRoleCommand(HostRoleCommandEntity hostRoleCommandEntity,
HostDAO hostDAO,
ExecutionCommandDAO executionCommandDAO,
ExecutionCommandWrapperFactory ecwFactory) |
HostRoleCommand(Host host,
Role role,
ServiceComponentHostEvent event,
RoleCommand roleCommand,
boolean retryAllowed,
boolean autoSkipFailure,
HostDAO hostDAO,
ExecutionCommandDAO executionCommandDAO,
ExecutionCommandWrapperFactory ecwFactory) |
HostRoleCommand(String hostName,
Role role,
ServiceComponentHostEvent event,
RoleCommand roleCommand,
boolean retryAllowed,
boolean autoSkipFailure,
HostDAO hostDAO,
ExecutionCommandDAO executionCommandDAO,
ExecutionCommandWrapperFactory ecwFactory)
Simple constructor, should be created using the Factory class.
|
HostRoleCommand(String hostName,
Role role,
ServiceComponentHostEvent event,
RoleCommand command,
HostDAO hostDAO,
ExecutionCommandDAO executionCommandDAO,
ExecutionCommandWrapperFactory ecwFactory)
Simple constructor, should be created using the Factory class.
|
Modifier and Type | Method and Description |
---|---|
HostRoleCommandEntity |
constructNewPersistenceEntity() |
boolean |
equals(Object other) |
short |
getAttemptCount() |
String |
getCommandDetail() |
String |
getCustomCommandName() |
long |
getEndTime() |
String |
getErrorLog() |
ServiceComponentHostEventWrapper |
getEvent() |
ExecutionCommandWrapper |
getExecutionCommandWrapper() |
int |
getExitCode() |
long |
getHostId() |
String |
getHostName() |
long |
getLastAttemptTime() |
String |
getOpsDisplayName() |
long |
getOriginalStartTime() |
String |
getOutputLog() |
long |
getRequestId() |
Role |
getRole() |
RoleCommand |
getRoleCommand() |
long |
getStageId() |
long |
getStartTime() |
HostRoleStatus |
getStatus() |
String |
getStderr() |
String |
getStdout() |
String |
getStructuredOut() |
long |
getTaskId() |
int |
hashCode() |
void |
incrementAttemptCount() |
boolean |
isBackgroundCommand()
Gets whether this command runs in the background and does not block other
commands.
|
boolean |
isFailureAutoSkipped()
Gets whether commands which fail and are retryable are automatically
skipped and marked with
HostRoleStatus.SKIPPED_FAILED . |
boolean |
isRetryAllowed() |
void |
setBackgroundCommand(boolean isBackgroundCommand)
Sets whether this command runs in the background and does not block other
commands.
|
void |
setCommandDetail(String commandDetail) |
void |
setCustomCommandName(String customCommandName) |
void |
setEndTime(long endTime) |
void |
setErrorLog(String errorLog) |
void |
setExecutionCommandWrapper(ExecutionCommandWrapper executionCommandWrapper) |
void |
setExitCode(int exitCode) |
void |
setHost(long hostId,
String hostName)
Sets the host ID and name for the host associated with this command.
|
void |
setLastAttemptTime(long lastAttemptTime) |
void |
setOpsDisplayName(String opsDisplayName) |
void |
setOriginalStartTime(long originalStartTime) |
void |
setOutputLog(String outputLog) |
void |
setRequestId(long requestId) |
void |
setRoleCommand(RoleCommand roleCommand) |
void |
setStageId(long stageId) |
void |
setStartTime(long startTime) |
void |
setStatus(HostRoleStatus status) |
void |
setStderr(String stderr) |
void |
setStdout(String stdout) |
void |
setStructuredOut(String structuredOut) |
void |
setTaskId(long taskId) |
String |
toString() |
public HostRoleCommand(String hostName, Role role, ServiceComponentHostEvent event, RoleCommand command, HostDAO hostDAO, ExecutionCommandDAO executionCommandDAO, ExecutionCommandWrapperFactory ecwFactory)
hostName
- Host namerole
- Action to runevent
- Event on the host and componentcommand
- Type of commandhostDAO
- HostDAO
instance being injectedpublic HostRoleCommand(String hostName, Role role, ServiceComponentHostEvent event, RoleCommand roleCommand, boolean retryAllowed, boolean autoSkipFailure, HostDAO hostDAO, ExecutionCommandDAO executionCommandDAO, ExecutionCommandWrapperFactory ecwFactory)
hostName
- Host namerole
- Action to runevent
- Event on the host and componentroleCommand
- Type of commandretryAllowed
- Whether the command can be repeatedhostDAO
- HostDAO
instance being injectedpublic HostRoleCommand(Host host, Role role, ServiceComponentHostEvent event, RoleCommand roleCommand, boolean retryAllowed, boolean autoSkipFailure, HostDAO hostDAO, ExecutionCommandDAO executionCommandDAO, ExecutionCommandWrapperFactory ecwFactory)
public HostRoleCommand(HostRoleCommandEntity hostRoleCommandEntity, HostDAO hostDAO, ExecutionCommandDAO executionCommandDAO, ExecutionCommandWrapperFactory ecwFactory)
public HostRoleCommandEntity constructNewPersistenceEntity()
public long getTaskId()
public void setRequestId(long requestId)
public void setStageId(long stageId)
public void setTaskId(long taskId)
public void setHost(long hostId, String hostName)
hostId
- hostName
- public String getHostName()
public long getHostId()
public Role getRole()
public String getCommandDetail()
public void setCommandDetail(String commandDetail)
public String getOpsDisplayName()
public void setOpsDisplayName(String opsDisplayName)
public String getCustomCommandName()
public void setCustomCommandName(String customCommandName)
public HostRoleStatus getStatus()
public void setStatus(HostRoleStatus status)
public ServiceComponentHostEventWrapper getEvent()
public String getStdout()
public void setStdout(String stdout)
public String getStderr()
public void setStderr(String stderr)
public String getOutputLog()
public void setOutputLog(String outputLog)
public String getErrorLog()
public void setErrorLog(String errorLog)
public int getExitCode()
public void setExitCode(int exitCode)
public long getStartTime()
public void setStartTime(long startTime)
public long getOriginalStartTime()
public void setOriginalStartTime(long originalStartTime)
public long getLastAttemptTime()
public void setLastAttemptTime(long lastAttemptTime)
public short getAttemptCount()
public void incrementAttemptCount()
public boolean isRetryAllowed()
public String getStructuredOut()
public void setStructuredOut(String structuredOut)
public long getEndTime()
public void setEndTime(long endTime)
public ExecutionCommandWrapper getExecutionCommandWrapper()
public void setExecutionCommandWrapper(ExecutionCommandWrapper executionCommandWrapper)
public RoleCommand getRoleCommand()
public void setRoleCommand(RoleCommand roleCommand)
public long getStageId()
public long getRequestId()
public boolean isBackgroundCommand()
true
if this command runs in the background, false
otherise.public void setBackgroundCommand(boolean isBackgroundCommand)
isBackgroundCommand
- true
if this command runs in the background, false
otherise.public boolean isFailureAutoSkipped()
HostRoleStatus.SKIPPED_FAILED
.Copyright © 2022 Apache Software Foundation. All rights reserved.