@LimitedPrivate("MapReduce")
@Unstable
public class Progress
extends java.lang.Object
Progress instances, each modelling a phase of
execution. The root is constructed with Progress(). Nodes for
sub-phases are created by calling addPhase().| Constructor | Description |
|---|---|
Progress() |
Creates a new root node.
|
| Modifier and Type | Method | Description |
|---|---|---|
Progress |
addPhase() |
Adds a node to the tree.
|
Progress |
addPhase(float weightage) |
Adds a node with a specified progress weightage to the tree.
|
Progress |
addPhase(java.lang.String status) |
Adds a named node to the tree.
|
Progress |
addPhase(java.lang.String status,
float weightage) |
Adds a named node with a specified progress weightage to the tree.
|
void |
addPhases(int n) |
Adds n nodes to the tree.
|
void |
complete() |
Completes this node, moving the parent node to its next child.
|
float |
get() |
Returns the overall progress of the root.
|
float |
getProgress() |
Returns progress in this node.
|
Progress |
phase() |
Returns the current sub-node executing.
|
void |
set(float progress) |
Called during execution on a leaf node to set its progress.
|
void |
setStatus(java.lang.String status) |
|
void |
startNextPhase() |
Called during execution to move to the next phase at this level in the
tree.
|
java.lang.String |
toString() |
public Progress addPhase(java.lang.String status)
status - status.public Progress addPhase()
public Progress addPhase(java.lang.String status, float weightage)
status - status.weightage - weightage.public Progress addPhase(float weightage)
weightage - weightage.public void addPhases(int n)
n - n.public void startNextPhase()
public Progress phase()
public void complete()
public void set(float progress)
progress - progress.public float get()
public float getProgress()
public void setStatus(java.lang.String status)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.