Package com.github.javaparser.utils
Class SourceRoot.ParallelParse
java.lang.Object
java.util.concurrent.ForkJoinTask<Void>
java.util.concurrent.RecursiveAction
com.github.javaparser.utils.SourceRoot.ParallelParse
- All Implemented Interfaces:
Serializable
,Future<Void>
- Enclosing class:
SourceRoot
Executes a recursive file tree walk using threads. A new thread is invoked for each new directory discovered
during the walk. For each file visited, the user-provided
SourceRoot.ParallelParse.VisitFileCallback
is called with the current
path and file attributes. Any shared resources accessed in a SourceRoot.ParallelParse.VisitFileCallback
should be made
thread-safe.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SourceRoot.ParallelParse.VisitFileCallback
private final SourceRoot
private static final long
-
Constructor Summary
ConstructorsConstructorDescriptionParallelParse
(Path path, SourceRoot.ParallelParse.VisitFileCallback callback) -
Method Summary
Methods inherited from class java.util.concurrent.RecursiveAction
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
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
root
-
callback
-
-
Constructor Details
-
ParallelParse
ParallelParse(Path path, SourceRoot.ParallelParse.VisitFileCallback callback)
-
-
Method Details
-
compute
protected void compute()- Specified by:
compute
in classRecursiveAction
-