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
SimpleOpProcessorimplementation that iterates remotely submitted serializedTraversalobjects.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Field Summary
Fields Modifier and Type Field Description static StringOP_PROCESSOR_NAMEstatic com.codahale.metrics.TimertraversalOpTimer-
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 voidbeforeProcessing(Graph graph, Context ctx)voidclose()StringgetName()The name of the processor which requests must refer to "processor" field on a request.protected voidhandleIterator(Context context, Iterator itty, Graph graph)protected voidonError(Graph graph, Context ctx, Throwable error)protected voidonTraversalSuccess(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:OpProcessorThe 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:OpProcessorGiven 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
-
-