public final class Attempt extends Object
Constructor and Description |
---|
Attempt(NodeRequest request)
Creates a new NodeRequest attempt object.
|
Modifier and Type | Method and Description |
---|---|
void |
fail(Exception e) |
String |
getDurationFormatted()
Returns the duration as a formatted string as: hh:mm:ss.
|
long |
getDurationSeconds() |
String |
getError()
If set, returns the attempt error string formatted stack trace, otherwise returns null if no error.
|
long |
getFinishTime() |
List<String> |
getNodes()
Get nodes allocated from a node request
|
String |
getNodesAsFormattedString()
Returns the requested nodes as a formatted string.
|
NodeRequest |
getRequest()
Returns a reference to the node request object for this attempt.
|
NodePoolJob.NodeRequestAttemptState |
getResult() |
long |
getStartTime() |
boolean |
isDone() |
boolean |
isFailure() |
boolean |
isSuccess() |
void |
setFinishTime() |
void |
succeed() |
String |
toString() |
public Attempt(NodeRequest request)
request
- the NodePool request objectpublic NodeRequest getRequest()
public void fail(Exception e)
public void succeed()
public long getStartTime()
public long getFinishTime()
public void setFinishTime()
public long getDurationSeconds()
public String getDurationFormatted()
public String getError()
public boolean isDone()
public boolean isFailure()
public boolean isSuccess()
public NodePoolJob.NodeRequestAttemptState getResult()
public List<String> getNodes()
public String getNodesAsFormattedString()
Copyright © 2016–2018. All rights reserved.