public class FinishState extends Object
Constructor and Description |
---|
FinishState(String creatorName)
Create a new finish state for the given activity.
|
Modifier and Type | Method and Description |
---|---|
boolean |
eurekaFound()
Return whether the eureka event has already occurred.
|
List<Throwable> |
exceptions()
Create a new stack or return current one.
|
long |
id()
Returns the id of the FinishState.
|
String |
name()
Returns the name of the FinishState.
|
void |
notifySubActivitySpawn()
An activity created under this finish has been created.
|
void |
notifySubActivityTermination()
An activity created under this finish has terminated.
|
void |
notifySubActivityTermination(Throwable throwable)
An activity created under this finish has terminated abruptly.
|
void |
pushException(Throwable throwable)
Push an exception onto the stack.
|
protected HjNestedEureka |
registeredEureka()
Return the Eureka registered with this FinishState.
|
void |
registerEureka(HjNestedEureka parentEureka,
HjEureka<?,?,?> currentEureka)
Registers a eureka with this FinishState.
|
protected HjEureka<?,?,?> |
retrieveEureka()
Return the Eureka registered with this FinishState.
|
String |
toString()
Return a string to be used in Report messages.
|
void |
waitForFinish()
This method returns only when all spawned activity registered with this FinishState have terminated either
normally or abruptly.
|
public FinishState(String creatorName)
creatorName
- The name of the activity creating the finish state.public long id()
public String name()
public void registerEureka(HjNestedEureka parentEureka, HjEureka<?,?,?> currentEureka)
parentEureka
- The eureka (may be null) under which the current task is already execution.currentEureka
- The new eureka instance to register and start a new eureka computation.protected HjNestedEureka registeredEureka()
protected HjEureka<?,?,?> retrieveEureka()
public boolean eurekaFound()
public final void waitForFinish() throws SuspendableException
SuspendableException
public final void notifySubActivitySpawn()
public final void notifySubActivityTermination()
public final void notifySubActivityTermination(Throwable throwable)
throwable
- -- The exception thrown by the activity that terminated abruptly.public final void pushException(Throwable throwable)
throwable
- Thrown exceptionpublic final List<Throwable> exceptions()
Copyright © 2015 Rice University - Department of Computer Science. All rights reserved.