Class AbstractExecutorV5Impl
java.lang.Object
edu.wustl.cse231s.v5.impl.AbstractV5Impl
edu.wustl.cse231s.v5.impl.executor.AbstractExecutorV5Impl
- All Implemented Interfaces:
V5Impl
- Direct Known Subclasses:
AbstractActivityTrackingExecutorV5Impl,ExecutorV5Impl
- Author:
- Dennis Cosgrove (http://www.cse.wustl.edu/~cosgroved/)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceprotected static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static ThreadLocal<Deque<AbstractExecutorV5Impl.Context>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidasync(CheckedRunnable body)protected voidasyncTasks(CheckedRunnable[] tasks)protected abstract AbstractExecutorV5Impl.FinishContextcreateFinishContext(AbstractExecutorV5Impl.Context context, RegisterAccumulatorsOption registerAccumulatorsOption)voiddoWork(long n)voidfinish(CheckedRunnable body)voidfinish(RegisterAccumulatorsOption registerAccumulatorsOption, CheckedRunnable body)<R> Future<R>future(CheckedCallable<R> body)protected static AbstractExecutorV5Impl.ContextnewDoubleFinishAccumulator(NumberReductionOperator operator, ContentionLevel contentionLevel, DoubleAccumulationDeterminismPolicy determinismPolicy)newIntegerFinishAccumulator(NumberReductionOperator operator, ContentionLevel contentionLevel)<T> FinishAccumulator<T>newReducerFinishAccumulator(AccumulatorReducer<T> reducer, ContentionLevel contentionLevel)intvoidprotected <T> voidsplit(Spliterator<T> spliterator, long threshold, CheckedConsumer<T> body)Methods inherited from class edu.wustl.cse231s.v5.impl.AbstractV5Impl
async, forall, forall, forall, forall, forall, forall, forall2d, forall2d, forasync, forasync, forasync, forasync, forasync, forasync, forasync2d, forasync2d, forseq, forseq, forseq, forseq, forseq, forseq, forseq2d, forseq2d, launchMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wustl.cse231s.v5.impl.V5Impl
future, getBookkeeping, getCurrentActivity, getMetrics, resetBookkeeping
-
Field Details
-
contextStack
-
-
Constructor Details
-
AbstractExecutorV5Impl
-
-
Method Details
-
shutdownNow
public void shutdownNow() -
createFinishContext
protected abstract AbstractExecutorV5Impl.FinishContext createFinishContext(AbstractExecutorV5Impl.Context context, RegisterAccumulatorsOption registerAccumulatorsOption) -
finish
public void finish(RegisterAccumulatorsOption registerAccumulatorsOption, CheckedRunnable body) throws InterruptedException, ExecutionException -
asyncTasks
- Specified by:
asyncTasksin classAbstractV5Impl- Throws:
InterruptedExceptionExecutionException
-
split
protected <T> void split(Spliterator<T> spliterator, long threshold, CheckedConsumer<T> body) throws InterruptedException, ExecutionException- Specified by:
splitin classAbstractV5Impl- Throws:
InterruptedExceptionExecutionException
-
async
-
future
-
numWorkerThreads
public int numWorkerThreads() -
finish
-
doWork
public void doWork(long n) -
newIntegerFinishAccumulator
public FinishAccumulator<Integer> newIntegerFinishAccumulator(NumberReductionOperator operator, ContentionLevel contentionLevel) -
newDoubleFinishAccumulator
public FinishAccumulator<Double> newDoubleFinishAccumulator(NumberReductionOperator operator, ContentionLevel contentionLevel, DoubleAccumulationDeterminismPolicy determinismPolicy) -
newReducerFinishAccumulator
public <T> FinishAccumulator<T> newReducerFinishAccumulator(AccumulatorReducer<T> reducer, ContentionLevel contentionLevel) -
getCurrentContext
-