Package com.github.javaparser.utils
Class SourceRoot.ParallelParse
- java.lang.Object
-
- java.util.concurrent.ForkJoinTask<java.lang.Void>
-
- java.util.concurrent.RecursiveAction
-
- com.github.javaparser.utils.SourceRoot.ParallelParse
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.concurrent.Future<java.lang.Void>
- Enclosing class:
- SourceRoot
private static class SourceRoot.ParallelParse extends java.util.concurrent.RecursiveAction
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-providedSourceRoot.ParallelParse.VisitFileCallback
is called with the current path and file attributes. Any shared resources accessed in aSourceRoot.ParallelParse.VisitFileCallback
should be made thread-safe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static interface
SourceRoot.ParallelParse.VisitFileCallback
-
Field Summary
Fields Modifier and Type Field Description private SourceRoot.ParallelParse.VisitFileCallback
callback
private SourceRoot
root
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description ParallelParse(java.nio.file.Path path, SourceRoot.ParallelParse.VisitFileCallback callback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
compute()
-
Methods inherited from class java.util.concurrent.ForkJoinTask
adapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, complete, completeExceptionally, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnfork
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
root
private final SourceRoot root
-
callback
private final SourceRoot.ParallelParse.VisitFileCallback callback
-
-
Constructor Detail
-
ParallelParse
ParallelParse(java.nio.file.Path path, SourceRoot.ParallelParse.VisitFileCallback callback)
-
-