public abstract class AbstractEvalOpProcessor extends AbstractOpProcessor
OpProcessor implementation that helps with operations that deal
with script evaluation functions.| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractEvalOpProcessor.BindingSupplier |
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_MAX_PARAMETERS
The maximum number of parameters that can be passed on a script evaluation request.
|
static int |
DEFAULT_MAX_PARAMETERS
Default number of parameters allowed on a script evaluation request.
|
static com.codahale.metrics.Timer |
evalOpTimer |
protected static Set<String> |
INVALID_BINDINGS_KEYS
This may or may not be the full set of invalid binding keys.
|
protected int |
maxParameters |
manageTransactions| Modifier | Constructor and Description |
|---|---|
protected |
AbstractEvalOpProcessor(boolean manageTransactions) |
attemptCommit, attemptRollback, generateMetaData, generateResultMetaData, generateStatusAttributes, handleIterator, handleIterator, isForceFlushed, iterateComplete, makeFrame, makeFrame, makeFrame, makeFrame, makeFrameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, initclosepublic static final com.codahale.metrics.Timer evalOpTimer
public static final String CONFIG_MAX_PARAMETERS
public static final int DEFAULT_MAX_PARAMETERS
protected int maxParameters
protected static final Set<String> INVALID_BINDINGS_KEYS
toUpperCase() on the accessor values of T solves an issue where the ScriptEngine
ignores private scope on T and imports static fields.protected AbstractEvalOpProcessor(boolean manageTransactions)
public abstract org.apache.tinkerpop.gremlin.util.function.ThrowingConsumer<Context> getEvalOp()
public abstract Optional<org.apache.tinkerpop.gremlin.util.function.ThrowingConsumer<Context>> selectOther(RequestMessage requestMessage) throws OpProcessorException
OpProcessor.select(Context) that are not
handled will be passed to this method to see if the sub-class can service the requested op code.OpProcessorExceptionpublic org.apache.tinkerpop.gremlin.util.function.ThrowingConsumer<Context> select(Context ctx) throws OpProcessorException
OpProcessorOpProcessorExceptionprotected Optional<org.apache.tinkerpop.gremlin.util.function.ThrowingConsumer<Context>> validateEvalMessage(RequestMessage message) throws OpProcessorException
OpProcessorException@Deprecated protected void evalOpInternal(ResponseHandlerContext ctx, Supplier<GremlinExecutor> gremlinExecutorSupplier, AbstractEvalOpProcessor.BindingSupplier bindingsSupplier) throws OpProcessorException
evalOpInternal(Context, Supplier, BindingSupplier).OpProcessorExceptionprotected void evalOpInternal(Context ctx, Supplier<GremlinExecutor> gremlinExecutorSupplier, AbstractEvalOpProcessor.BindingSupplier bindingsSupplier) throws OpProcessorException
ResponseMessage objects down the Netty pipeline. It also handles script timeouts,
iteration timeouts, metrics and building bindings. Note that result iteration is delegated to the
AbstractOpProcessor.handleIterator(Context, Iterator) method, so those extending this class could override that method for
better control over result iteration.ctx - The current Gremlin Server Context. This handler ensures that only a single final
response is sent to the client.gremlinExecutorSupplier - A function that returns the GremlinExecutor to use in executing the
script evaluation.bindingsSupplier - A function that returns the Bindings to provide to the
GremlinExecutor.eval(java.lang.String) method.OpProcessorExceptionCopyright © 2013–2019 Apache Software Foundation. All rights reserved.