Class TraversalOpProcessor
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.server.op.AbstractOpProcessor
-
- org.apache.tinkerpop.gremlin.server.op.traversal.TraversalOpProcessor
-
- All Implemented Interfaces:
AutoCloseable
,OpProcessor
public class TraversalOpProcessor extends AbstractOpProcessor
SimpleOpProcessor
implementation that iterates remotely submitted serializedTraversal
objects.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Field Summary
Fields Modifier and Type Field Description static String
OP_PROCESSOR_NAME
static com.codahale.metrics.Timer
traversalOpTimer
-
Fields inherited from class org.apache.tinkerpop.gremlin.server.op.AbstractOpProcessor
manageTransactions
-
-
Constructor Summary
Constructors Constructor Description TraversalOpProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
beforeProcessing(Graph graph, Context ctx)
void
close()
String
getName()
The name of the processor which requests must refer to "processor" field on a request.protected void
handleIterator(Context context, Iterator itty, Graph graph)
protected void
onError(Graph graph, Context ctx, Throwable error)
protected void
onTraversalSuccess(Graph graph, Context ctx)
ThrowingConsumer<Context>
select(Context context)
Given the context (which contains the RequestMessage), return back a Consumer function that will be executed with the context.-
Methods inherited from class org.apache.tinkerpop.gremlin.server.op.AbstractOpProcessor
attemptCommit, attemptRollback, determineIfSpecialException, generateResultMetaData, generateStatusAttributes, handleIterator, isForceFlushed, iterateComplete, makeFrame
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.tinkerpop.gremlin.server.OpProcessor
init
-
-
-
-
Field Detail
-
OP_PROCESSOR_NAME
public static final String OP_PROCESSOR_NAME
- See Also:
- Constant Field Values
-
traversalOpTimer
public static final com.codahale.metrics.Timer traversalOpTimer
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:OpProcessor
The name of the processor which requests must refer to "processor" field on a request.
-
select
public ThrowingConsumer<Context> select(Context context) throws OpProcessorException
Description copied from interface:OpProcessor
Given the context (which contains the RequestMessage), return back a Consumer function that will be executed with the context. A typical implementation will simply check the "op" field on the RequestMessage and return the Consumer function for that particular operation.- Returns:
- Throws:
OpProcessorException
-
handleIterator
protected void handleIterator(Context context, Iterator itty, Graph graph) throws InterruptedException
- Throws:
InterruptedException
-
-