public abstract class SimtThreadPool extends AbstractExecutorService implements BaseThreadPool
Modifier and Type | Class and Description |
---|---|
static class |
SimtThreadPool.SimtThreadFactory |
Modifier and Type | Field and Description |
---|---|
protected int |
maxThreads
The maximum number of threads launched by the runtime
|
protected AtomicInteger |
nbThreadBlocked
Number of activities that can possibly wait at a given moment.
|
protected int |
numThreads |
protected boolean |
shutdownSignal |
protected int |
simtTasks |
protected SimtThreadPool.SimtThreadFactory |
simtThreadFactory |
protected Map<String,int[]> |
workerStats |
Constructor and Description |
---|
SimtThreadPool(int numThreads,
boolean asyncMode) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
protected void |
decrementSimtTasks() |
int |
getNbThreadBlocked()
Getter for the field
nbThreadBlocked . |
int |
getParallelism() |
protected int |
getPoolSize() |
String |
getStats()
getStats.
|
protected void |
incrementSimtTasks() |
boolean |
isShutdown() |
boolean |
isTerminated() |
protected void |
registerThreadStats(String threadName,
int[] statsObject) |
protected void |
reportRuntimeError(String exceptionMsg)
reportRuntimeError.
|
void |
shutdown() |
int |
staticGetNumThreadBlockingPoints() |
int |
staticGetNumThreadsCreated() |
void |
staticSetNumThreadBlockingPoints(int numThreadBlockingPoints) |
void |
staticSetNumThreadsCreated(int numThreadsCreated) |
abstract void |
threadBlockedNotification()
Notification when a thread has been blocked by the HJ runtime by some synchronization constraint.
|
void |
threadUnblockedNotification()
Notification when a thread has been unblocked in the HJ runtime by some synchronization constraint.
|
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute, shutdownNow
shutdownNow
protected final AtomicInteger nbThreadBlocked
protected final int maxThreads
protected int numThreads
protected SimtThreadPool.SimtThreadFactory simtThreadFactory
protected int simtTasks
protected boolean shutdownSignal
protected void registerThreadStats(String threadName, int[] statsObject)
public final String getStats()
getStats.
getStats
in interface BaseThreadPool
protected int getPoolSize()
public int getParallelism()
getParallelism
in interface BaseThreadPool
public abstract void threadBlockedNotification()
protected final void reportRuntimeError(String exceptionMsg)
reportRuntimeError.
exceptionMsg
- a String
object.public final void threadUnblockedNotification()
public final int getNbThreadBlocked()
Getter for the field nbThreadBlocked
.
getNbThreadBlocked
in interface BaseThreadPool
public void shutdown()
shutdown
in interface BaseThreadPool
shutdown
in interface ExecutorService
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
awaitTermination
in interface ExecutorService
InterruptedException
public boolean isTerminated()
isTerminated
in interface ExecutorService
public boolean isShutdown()
isShutdown
in interface ExecutorService
protected void decrementSimtTasks()
protected void incrementSimtTasks()
public int staticGetNumThreadsCreated()
staticGetNumThreadsCreated
in interface BaseThreadPool
public void staticSetNumThreadsCreated(int numThreadsCreated)
staticSetNumThreadsCreated
in interface BaseThreadPool
public int staticGetNumThreadBlockingPoints()
staticGetNumThreadBlockingPoints
in interface BaseThreadPool
public void staticSetNumThreadBlockingPoints(int numThreadBlockingPoints)
staticSetNumThreadBlockingPoints
in interface BaseThreadPool
Copyright © 2015 Rice University - Department of Computer Science. All rights reserved.