
public final class BlockingPhaserManager extends Object implements PhaserManager
BlockingPhaserManager class.
| Modifier and Type | Class and Description |
|---|---|
static class |
BlockingPhaserManager.PhaserEventType |
| Constructor and Description |
|---|
BlockingPhaserManager(PropertyChangeListener changeListener)
No-args constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkPhaserUse(InternalPhaser ph,
HjPhaserMode prm)
Validates the use of a phaser in the current context.
|
protected void |
deregisterPhasers(BlockingActivity activity)
deregisterPhasers.
|
void |
doNext(BlockingActivity activity)
Performs a next operation with the given activity.
|
protected int |
doNextSinglePhase1(BlockingActivity activity,
String loc)
doNextSinglePhase1.
|
protected void |
doNextSinglePhase2(BlockingActivity activity)
doNextSinglePhase2.
|
void |
doSignal(BlockingActivity activity)
Performs a phaser signal operation with the given activity.
|
void |
doSignal(BlockingActivity activity,
InternalPhaser phaser)
Performs a signal operation with the given activity.
|
void |
doWait(BlockingActivity activity)
Performs a phaser wait operation with the given activity.
|
void |
doWait(BlockingActivity activity,
InternalPhaser phaser)
Performs a wait operation with the given activity.
|
boolean |
doWaitForNextSinglePhase1(BlockingActivity activity,
InternalPhaser phaser,
String loc)
Performs the first stage wait operation with the given activity in next-with-signal mode.
|
void |
doWaitForNextSinglePhase2(BlockingActivity activity,
InternalPhaser phaser)
Performs the second stage wait operation with the given activity in next-with-signal mode.
|
boolean |
dropPhaser(BlockingActivity activity,
InternalPhaser phaser)
Drops the phaser registered with an activity.
|
int |
getSigPhase(BlockingActivity activity,
InternalPhaser phaser)
getSigPhase.
|
int |
getWaitPhase(BlockingActivity activity,
InternalPhaser phaser)
getWaitPhase.
|
void |
inheritPhasers(BlockingActivity parentActivity,
BlockingActivity childActivity)
Registers a phaser to the specified activity.
|
void |
onActivityEnd(BlockingActivity activity,
BlockingFinishState finishState)
Call back for when the event ends execution.
|
void |
onActivityResume(BlockingActivity activity)
Call back for when the event execution is resumed.
|
void |
onActivitySpawn(BlockingActivity parentActivity,
BlockingActivity childActivity)
Call back for when the event ends execution.
|
void |
onActivityStart(BlockingActivity activity)
Call back for when the event starts execution.
|
void |
onActivitySuspend(BlockingActivity activity)
Call back for when the event execution is suspended.
|
void |
onFinishScopeStart(BlockingActivity activity,
BlockingFinishState finishState) |
void |
onPostFinishScopeEnd(BlockingActivity activity,
BlockingFinishState finishState) |
void |
onPreFinishScopeEnd(BlockingActivity activity,
BlockingFinishState finishState) |
HjPhaserMode |
phaserMode(BlockingActivity activity,
InternalPhaser phaser)
phaserMode.
|
void |
register(BlockingActivity parentActivity,
BlockingActivity childActivity,
InternalPhaser phaser,
HjPhaserMode phaserMode)
register.
|
boolean |
registered(BlockingActivity activity,
InternalPhaser phaser)
registered.
|
void |
registerPhaserToIEF(BlockingActivity activity,
InternalPhaser phaser)
Registers a phaser to the immediately enclosing finish defined by the activity.
|
protected void |
resume(BlockingActivity activity,
InternalPhaser phaser,
boolean newValue)
resume.
|
boolean |
resumed(BlockingActivity activity,
InternalPhaser phaser)
resumed.
|
protected static void |
throwPhaserException(String message)
throws
PhaserException with the specified message |
String |
toString() |
void |
updateActivityFromCompanion(BlockingActivity activity,
CompanionMetrics companionMetrics) |
void |
updateCompanionFromActivity(BlockingActivity activity,
CompanionMetrics companionMetrics) |
public BlockingPhaserManager(PropertyChangeListener changeListener)
changeListener - a PropertyChangeListener object.protected static void throwPhaserException(String message)
PhaserException with the specified messagemessage - The Exception messagePhaserException - with the specified messagepublic void checkPhaserUse(InternalPhaser ph, HjPhaserMode prm)
PhaserManagercheckPhaserUse in interface PhaserManagerph - The phaserprm - The phaser modepublic void onActivityStart(BlockingActivity activity)
onActivityStart in interface ActivityListeners.ActivityListeneractivity - The activity being started.public void onActivitySuspend(BlockingActivity activity)
onActivitySuspend in interface ActivityListeners.ActivityListeneractivity - The activity being suspended.public void onActivityResume(BlockingActivity activity)
onActivityResume in interface ActivityListeners.ActivityListeneractivity - The activity being resumed.public void onActivityEnd(BlockingActivity activity, BlockingFinishState finishState)
onActivityEnd in interface ActivityListeners.ActivityListeneractivity - The activity that is ending.finishState - The root finish state associated with the activitypublic void onActivitySpawn(BlockingActivity parentActivity, BlockingActivity childActivity)
onActivitySpawn in interface ActivityListeners.ActivityListenerparentActivity - The parent activity.childActivity - The child activity that was spawned.public void onFinishScopeStart(BlockingActivity activity, BlockingFinishState finishState)
onFinishScopeStart in interface ActivityListeners.ActivityListeneractivity - The activity running the finish scopefinishState - The finish state associated with the activitypublic void onPreFinishScopeEnd(BlockingActivity activity, BlockingFinishState finishState)
onPreFinishScopeEnd in interface ActivityListeners.ActivityListeneractivity - The activity that ran the finish scopefinishState - The finish state associated with the activitypublic void onPostFinishScopeEnd(BlockingActivity activity, BlockingFinishState finishState)
onPostFinishScopeEnd in interface ActivityListeners.ActivityListeneractivity - The activity that ran the finish scopefinishState - The finish state associated with the activitypublic void updateCompanionFromActivity(BlockingActivity activity, CompanionMetrics companionMetrics)
updateCompanionFromActivity in interface ActivityListeners.ActivityListenerpublic void updateActivityFromCompanion(BlockingActivity activity, CompanionMetrics companionMetrics)
updateActivityFromCompanion in interface ActivityListeners.ActivityListenerpublic boolean dropPhaser(BlockingActivity activity, InternalPhaser phaser)
dropPhaser in interface PhaserManageractivity - The activity from which to drop the phaser.phaser - The phaser to drop.protected void deregisterPhasers(BlockingActivity activity)
deregisterPhasers.
activity - a BlockingActivity object.public boolean registered(BlockingActivity activity, InternalPhaser phaser)
registered.
registered in interface PhaserManageractivity - The activity.phaser - The phaser.public void registerPhaserToIEF(BlockingActivity activity, InternalPhaser phaser)
registerPhaserToIEF in interface PhaserManageractivity - The activity which determines the IEF.phaser - The phaser to register to the IEF.public void inheritPhasers(BlockingActivity parentActivity, BlockingActivity childActivity)
inheritPhasers in interface PhaserManagerparentActivity - The activity to inherit phasers from.childActivity - The new child activity.public void register(BlockingActivity parentActivity, BlockingActivity childActivity, InternalPhaser phaser, HjPhaserMode phaserMode)
register.
register in interface PhaserManagerparentActivity - The activity to inherit phasers from.childActivity - The new child activity.phaser - The new phaser to inheritphaserMode - The phaser registration modepublic HjPhaserMode phaserMode(BlockingActivity activity, InternalPhaser phaser)
phaserMode.
phaserMode in interface PhaserManageractivity - The activity.phaser - The phaser.protected void resume(BlockingActivity activity, InternalPhaser phaser, boolean newValue)
resume.
activity - a BlockingActivity object.phaser - a InternalPhaser object.newValue - a boolean.public boolean resumed(BlockingActivity activity, InternalPhaser phaser)
resumed.
resumed in interface PhaserManageractivity - The activity.phaser - The phaser.public int getSigPhase(BlockingActivity activity, InternalPhaser phaser)
getSigPhase.
getSigPhase in interface PhaserManageractivity - The activity.phaser - The phaser.public int getWaitPhase(BlockingActivity activity, InternalPhaser phaser)
getWaitPhase.
getWaitPhase in interface PhaserManageractivity - The activity.phaser - The phaser.public void doNext(BlockingActivity activity)
doNext in interface PhaserManageractivity - The activity.protected int doNextSinglePhase1(BlockingActivity activity, String loc)
doNextSinglePhase1.
activity - a BlockingActivity object.loc - a String object.protected void doNextSinglePhase2(BlockingActivity activity)
doNextSinglePhase2.
activity - a BlockingActivity object.public void doSignal(BlockingActivity activity)
doSignal in interface PhaserManageractivity - The activity.public void doSignal(BlockingActivity activity, InternalPhaser phaser)
doSignal in interface PhaserManageractivity - The activity.phaser - The phaser.public void doWait(BlockingActivity activity)
doWait in interface PhaserManageractivity - The activity.public void doWait(BlockingActivity activity, InternalPhaser phaser)
doWait in interface PhaserManageractivity - The activity.phaser - The phaser.public boolean doWaitForNextSinglePhase1(BlockingActivity activity, InternalPhaser phaser, String loc)
doWaitForNextSinglePhase1 in interface PhaserManageractivity - The activity.phaser - The phaser.loc - The location of the next operationpublic void doWaitForNextSinglePhase2(BlockingActivity activity, InternalPhaser phaser)
doWaitForNextSinglePhase2 in interface PhaserManageractivity - The activity.phaser - The phaser.Copyright © 2014 Rice University - Department of Computer Science. All rights reserved.