
public final class BlockingPhaser extends Object implements InternalPhaser
BlockingPhaser class.
| Constructor and Description |
|---|
BlockingPhaser(HjPhaserMode phMode,
int busyWaitCount,
PhaserManager phManager)
Constructor for BlockingPhaser.
|
BlockingPhaser(HjPhaserMode phMode,
PhaserManager phManager)
Constructor for BlockingPhaser.
|
BlockingPhaser(PhaserManager phManager)
Constructor.
|
BlockingPhaser(String phName,
HjPhaserMode phMode,
int busyWaitCount,
PhaserManager phManager)
Constructor for BlockingPhaser.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doNext()
The next operation has the effect of advancing each phaser on which the task is
registered to its next phase, thereby synchronizing all activities registered
on the same phase.
|
void |
doWait()
Blocks until all phasers that this activity is registered with
have called continue (or next since next implies continue on
all registered phasers).
|
boolean |
doWaitSingle1()
doWaitSingle1.
|
boolean |
doWaitSingle1(String loc)
doWaitSingle1.
|
void |
doWaitSingle2()
doWaitSingle2.
|
void |
drop()
An activity calls this method to tell the phaser that it is no
longer interested in interacting with the phaser.
|
boolean |
dropped()
dropped.
|
HjPhaserMode |
getPhaserMode()
Returns the registration mode of the phaser was created with.
|
edu.rice.hj.runtime.phasers.PhaserSigWaitState |
getPhaseState(int phase)
getPhaseState.
|
int |
getSigPhase()
getSigPhase.
|
int |
getWaitPhase()
getWaitPhase.
|
int |
id()
id.
|
HjPhaserPair |
inMode(HjPhaserMode phaserMode)
Return a
HjPhaserPair with the phaser in the specified registration mode. |
boolean |
quiescent()
quiescent.
|
void |
register(BlockingActivity activity,
HjPhaserMode mode)
register.
|
boolean |
registered()
An activity may call this method to determine whether it is
registered with this phaser or not.
|
void |
signal()
An activity calls this method to tell the phaser that is done
with whatever it intended to do during this phase of the phaser.
|
String |
toDetailedString()
toDetailedString.
|
String |
toString() |
public BlockingPhaser(PhaserManager phManager)
phManager - The phaser manager that governs the phaser operations.public BlockingPhaser(HjPhaserMode phMode, PhaserManager phManager)
Constructor for BlockingPhaser.
phMode - The phaser registration mode. Should not be null.phManager - The phaser manager that governs the phaser operations.public BlockingPhaser(HjPhaserMode phMode, int busyWaitCount, PhaserManager phManager)
Constructor for BlockingPhaser.
phMode - The phaser registration mode. Should not be null.busyWaitCount - The limit to use in busy wait loop.phManager - The phaser manager that governs the phaser operations.public BlockingPhaser(String phName, HjPhaserMode phMode, int busyWaitCount, PhaserManager phManager)
Constructor for BlockingPhaser.
phName - The phaser name.phMode - The phaser registration mode. Should not be null.busyWaitCount - The limit to use in busy wait loop.phManager - The phaser manager that governs the phaser operations.public int id()
id.
public int getSigPhase()
getSigPhase.
getSigPhase in interface InternalPhaserpublic int getWaitPhase()
getWaitPhase.
getWaitPhase in interface InternalPhaserpublic HjPhaserPair inMode(HjPhaserMode phaserMode)
HjPhaserPair with the phaser in the specified registration mode.public HjPhaserMode getPhaserMode()
getPhaserMode in interface HjPhaserpublic void doNext()
next is equivalent to a signal followed by wait.
public void signal()
public edu.rice.hj.runtime.phasers.PhaserSigWaitState getPhaseState(int phase)
getPhaseState.
getPhaseState in interface InternalPhaserphase - a int.PhaserSigWaitState object.public void doWait()
This method is used internally by the Runtime and should not be visible for clients. Clients should use Runtime.doNext().
public boolean doWaitSingle1()
doWaitSingle1.
doWaitSingle1 in interface InternalPhaserpublic boolean doWaitSingle1(String loc)
doWaitSingle1.
doWaitSingle1 in interface InternalPhaserloc - The location of the next-with-single callpublic void doWaitSingle2()
doWaitSingle2.
doWaitSingle2 in interface InternalPhaserpublic void drop()
public boolean dropped()
dropped.
dropped in interface InternalPhaserpublic boolean registered()
registered in interface InternalPhaserpublic void register(BlockingActivity activity, HjPhaserMode mode)
register.
register in interface InternalPhaseractivity - a BlockingActivity object.mode - a HjPhaserMode object.public boolean quiescent()
quiescent.
quiescent in interface InternalPhaserCopyright © 2014 Rice University - Department of Computer Science. All rights reserved.