public class Module2 extends Module1
runtimeInitialized
Modifier | Constructor and Description |
---|---|
protected |
Module2()
Private constructor to disallow instance creation.
|
Modifier and Type | Method and Description |
---|---|
static void |
isolated(HjRunnable runnable)
Isolated statement identifies a critical section.
|
static void |
isolated(Object[] participants,
HjRunnable runnable)
|
static void |
isolated(Object participant1,
HjRunnable runnable)
Mutual exclusion is only guaranteed for instances of isolated statements that have a non-empty intersection in
their object lists.
|
static void |
isolated(Object participant1,
Object participant2,
HjRunnable runnable)
|
static void |
isolated(Object participant1,
Object participant2,
Object participant3,
HjRunnable runnable)
|
static <V> V |
isolatedWithReturn(HjCallable<V> callable)
variant for
isolated when the critical section needs to return a value. |
static <V> V |
isolatedWithReturn(Object[] participants,
HjCallable<V> callable)
variant for
isolated when the critical section needs to return a value. |
static <V> V |
isolatedWithReturn(Object participant1,
HjCallable<V> callable)
variant for
isolated when the critical section needs to return a value. |
static <V> V |
isolatedWithReturn(Object participant1,
Object participant2,
HjCallable<V> callable)
variant for
isolated when the critical section needs to return a value. |
static <V> V |
isolatedWithReturn(Object participant1,
Object participant2,
Object participant3,
HjCallable<V> callable)
variant for
isolated when the critical section needs to return a value. |
static <MsgType> HjActor<MsgType> |
newActor(HjProcedure<Pair<HjActor<MsgType>,MsgType>> processor)
Factory method to create a new Actor instance with the specified message processing body.
|
static Object |
readMode(Object wrappee)
Obtain a representation for the wrappee in read mode for use in isolated statements.
|
static Object |
writeMode(Object wrappee)
Obtain a representation for the wrappee in write mode for use in isolated statements.
|
async, asyncAwait, asyncAwait, asyncAwait, asyncAwait, forall, forall, forall, forall, forall, forall, forallChunked, forallChunked, forallChunked, forallChunked, forallChunked, forallChunked, forasync, forasync, forasync, forasync, forasync, forasync, forasyncChunked, forasyncChunked, forasyncChunked, forasyncChunked, forasyncChunked, forseq, forseq, forseq, forseq, forseq, forseq, future, futureAwait, futureAwait, futureAwait, futureAwait
abstractMetrics, asyncNb, asyncNbAt, asyncNbAwait, asyncNbAwait, asyncNbAwait, asyncNbAwait, asyncNbSeq, asyncNbSeq, asyncPhased, asyncPhased, asyncPhased, computeDefaultChunkSize, doWait, doWork, dumpEventLog, emergencyShutdown, finalizeHabanero, finish, finish, finish, finish, finish, forallNb, forallNb, forallNb, forallNb, forallNb, forallNb, forallNbChunked, forallNbChunked, forallNbChunked, forallNbChunked, forallNbChunked, forallNbChunked, forallPhased, forallPhased, forasync, forasyncChunked, forasyncNb, forasyncNb, forasyncNb, forasyncNb, forasyncNb, forasyncNbChunked, forasyncNbChunked, forasyncNbChunked, forasyncNbChunked, forasyncPhased, forasyncPhased, forasyncPhased, forseqNb, forseqNb, forseqNb, forseqNb, forseqNb, forseqNb, futureNb, futureNbAwait, futureNbAwait, futureNbAwait, futureNbAwait, futureNbSeq, futureNbSeq, group, group, here, initializeHabanero, launchHabaneroApp, launchHabaneroApp, myGroup, myGroup, newDataDrivenFuture, newDataDrivenFuture, newDDF, newDDF, newFinishAccumulator, newPhaser, newPhaser, newPoint, newRectangularRegion1D, newRectangularRegion2D, newRectangularRegion3D, next, numPlaces, numWorkerThreads, place, printBuildInfo, signal, waitAll, waitAny
public static void isolated(HjRunnable runnable)
isolatedWithReturn(edu.rice.hj.api.HjCallable)
variant available when the critical
section needs to return a value.
runnable
- The body of the code to run using weak isolation.HjRuntime.isolated(edu.rice.hj.api.HjRunnable)
public static void isolated(Object participant1, HjRunnable runnable)
Programmer may also specify list of objects as well as their read-write modes for which isolation is required. Not specifying a mode is the same as specifying a write mode. Distinguish between read/write accesses for further fine-grained mutual exclusion during parallelism.
participant1
- a Object
object.runnable
- a HjRunnable
object.HjRuntime.isolated(Object[], edu.rice.hj.api.HjRunnable)
public static void isolated(Object participant1, Object participant2, HjRunnable runnable)
participant1
- a Object
object.participant2
- a Object
object.runnable
- a HjRunnable
object.HjRuntime.isolated(Object[], edu.rice.hj.api.HjRunnable)
public static void isolated(Object[] participants, HjRunnable runnable)
participants
- an array of Object
objects.runnable
- a HjRunnable
object.HjRuntime.isolated(Object[], edu.rice.hj.api.HjRunnable)
public static void isolated(Object participant1, Object participant2, Object participant3, HjRunnable runnable)
participant1
- a Object
object.participant2
- a Object
object.participant3
- a Object
object.runnable
- a HjRunnable
object.HjRuntime.isolated(Object[], edu.rice.hj.api.HjRunnable)
public static <V> V isolatedWithReturn(HjCallable<V> callable)
isolated
when the critical section needs to return a value. Refer to isolated(edu.rice.hj.api.HjRunnable)
V
- a V object.callable
- a HjCallable
object.HjRuntime.isolatedWithReturn(edu.rice.hj.api.HjCallable)
public static <V> V isolatedWithReturn(Object participant1, HjCallable<V> callable)
isolated
when the critical section needs to return a value. Refer to isolated(Object, edu.rice.hj.api.HjRunnable)
V
- a V object.participant1
- a Object
object.callable
- a HjCallable
object.HjRuntime.isolatedWithReturn(Object[], edu.rice.hj.api.HjCallable)
public static <V> V isolatedWithReturn(Object participant1, Object participant2, HjCallable<V> callable)
isolated
when the critical section needs to return a value. Refer to isolated(Object, Object, edu.rice.hj.api.HjRunnable)
V
- a V object.participant1
- a Object
object.participant2
- a Object
object.callable
- a HjCallable
object.HjRuntime.isolatedWithReturn(Object[], edu.rice.hj.api.HjCallable)
public static <V> V isolatedWithReturn(Object[] participants, HjCallable<V> callable)
isolated
when the critical section needs to return a value. Refer to isolated(Object[], edu.rice.hj.api.HjRunnable)
V
- a V object.participants
- an array of Object
objects.callable
- a HjCallable
object.HjRuntime.isolatedWithReturn(Object[], edu.rice.hj.api.HjCallable)
public static <V> V isolatedWithReturn(Object participant1, Object participant2, Object participant3, HjCallable<V> callable)
isolated
when the critical section needs to return a value. Refer to isolated(Object, Object, Object, edu.rice.hj.api.HjRunnable)
V
- a V object.participant1
- a Object
object.participant2
- a Object
object.participant3
- a Object
object.callable
- a HjCallable
object.HjRuntime.isolatedWithReturn(Object[], edu.rice.hj.api.HjCallable)
public static Object readMode(Object wrappee)
wrappee
- a Object
object.Object
object.HjRuntime.readMode(Object)
public static Object writeMode(Object wrappee)
wrappee
- a Object
object.Object
object.HjRuntime.writeMode(Object)
public static <MsgType> HjActor<MsgType> newActor(HjProcedure<Pair<HjActor<MsgType>,MsgType>> processor)
MsgType
- The type of message being processed by the Actor.processor
- The logic that determines how a message is processed by the actor. The processor accepts a Pair
where the left element represents the Actor while the right element is the message being
currently processed.Copyright © 2015 Rice University - Department of Computer Science. All rights reserved.