Class SumTask
- All Implemented Interfaces:
Serializable
,Future<Long>
Codebeispiel zu RecursiveTask für die Summierung eines int-Arrays.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Constructor Summary
-
Method Summary
Methods inherited from class java.util.concurrent.RecursiveTask
exec, getRawResult, setRawResult
Methods inherited from class java.util.concurrent.ForkJoinTask
adapt, adapt, adapt, adaptInterruptible, cancel, compareAndSetForkJoinTaskTag, complete, completeExceptionally, exceptionNow, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollSubmission, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, quietlyJoin, quietlyJoinUninterruptibly, reinitialize, resultNow, setForkJoinTaskTag, state, tryUnfork
-
Constructor Details
-
SumTask
public SumTask(int[] array) Erzeugt einen Array-Sumierer Task.- Parameters:
array
- Interger-Array.
-
-
Method Details
-
compute
- Specified by:
compute
in classRecursiveTask<Long>
-