Package graphql.util
Class TreeParallelTransformer<T>
- java.lang.Object
-
- graphql.util.TreeParallelTransformer<T>
-
public class TreeParallelTransformer<T> extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
TreeParallelTransformer.EnterAction
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.ForkJoinPool
forkJoinPool
private NodeAdapter<T>
nodeAdapter
private java.util.Map<java.lang.Class<?>,java.lang.Object>
rootVars
private java.lang.Object
sharedContextData
-
Constructor Summary
Constructors Modifier Constructor Description private
TreeParallelTransformer(java.lang.Object sharedContextData, java.util.concurrent.ForkJoinPool forkJoinPool, NodeAdapter<T> nodeAdapter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private DefaultTraverserContext<T>
newContext(T o, TraverserContext<T> parent, NodeLocation position)
private DefaultTraverserContext<T>
newContextImpl(T curNode, TraverserContext<T> parent, java.util.Map<java.lang.Class<?>,java.lang.Object> vars, NodeLocation nodeLocation, boolean isRootContext)
DefaultTraverserContext<T>
newRootContext(java.util.Map<java.lang.Class<?>,java.lang.Object> vars)
static <T> TreeParallelTransformer<T>
parallelTransformer(NodeAdapter<T> nodeAdapter)
static <T> TreeParallelTransformer<T>
parallelTransformer(NodeAdapter<T> nodeAdapter, java.util.concurrent.ForkJoinPool forkJoinPool)
private java.util.List<DefaultTraverserContext>
pushAll(TraverserContext<T> traverserContext)
TreeParallelTransformer<T>
rootVar(java.lang.Class<?> key, java.lang.Object value)
TreeParallelTransformer<T>
rootVars(java.util.Map<java.lang.Class<?>,java.lang.Object> rootVars)
T
transform(T root, TraverserVisitor<? super T> visitor)
T
transformImpl(T root, TraverserVisitor<? super T> visitor)
-
-
-
Field Detail
-
rootVars
private final java.util.Map<java.lang.Class<?>,java.lang.Object> rootVars
-
forkJoinPool
private final java.util.concurrent.ForkJoinPool forkJoinPool
-
nodeAdapter
private final NodeAdapter<T> nodeAdapter
-
sharedContextData
private java.lang.Object sharedContextData
-
-
Constructor Detail
-
TreeParallelTransformer
private TreeParallelTransformer(java.lang.Object sharedContextData, java.util.concurrent.ForkJoinPool forkJoinPool, NodeAdapter<T> nodeAdapter)
-
-
Method Detail
-
parallelTransformer
public static <T> TreeParallelTransformer<T> parallelTransformer(NodeAdapter<T> nodeAdapter)
-
parallelTransformer
public static <T> TreeParallelTransformer<T> parallelTransformer(NodeAdapter<T> nodeAdapter, java.util.concurrent.ForkJoinPool forkJoinPool)
-
rootVars
public TreeParallelTransformer<T> rootVars(java.util.Map<java.lang.Class<?>,java.lang.Object> rootVars)
-
rootVar
public TreeParallelTransformer<T> rootVar(java.lang.Class<?> key, java.lang.Object value)
-
transform
public T transform(T root, TraverserVisitor<? super T> visitor)
-
newRootContext
public DefaultTraverserContext<T> newRootContext(java.util.Map<java.lang.Class<?>,java.lang.Object> vars)
-
transformImpl
public T transformImpl(T root, TraverserVisitor<? super T> visitor)
-
pushAll
private java.util.List<DefaultTraverserContext> pushAll(TraverserContext<T> traverserContext)
-
newContext
private DefaultTraverserContext<T> newContext(T o, TraverserContext<T> parent, NodeLocation position)
-
newContextImpl
private DefaultTraverserContext<T> newContextImpl(T curNode, TraverserContext<T> parent, java.util.Map<java.lang.Class<?>,java.lang.Object> vars, NodeLocation nodeLocation, boolean isRootContext)
-
-