public class StandardOpProcessor extends AbstractEvalOpProcessor
OpProcessor
implementation that handles ScriptEngine
script evaluation outside the context
of a session.AbstractEvalOpProcessor.BindingSupplier
Modifier and Type | Field and Description |
---|---|
protected Function<Context,AbstractEvalOpProcessor.BindingSupplier> |
bindingMaker |
static String |
OP_PROCESSOR_NAME |
CONFIG_MAX_PARAMETERS, DEFAULT_MAX_PARAMETERS, evalOpTimer, INVALID_BINDINGS_KEYS, maxParameters, validBindingName
manageTransactions
Constructor and Description |
---|
StandardOpProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected Function<Context,AbstractEvalOpProcessor.BindingSupplier> |
getBindingMaker()
A useful method for those extending this class, where the means for binding construction can be supplied
to this class.
|
ThrowingConsumer<Context> |
getEvalOp()
Provides an operation for evaluating a Gremlin script.
|
String |
getName()
The name of the processor which requests must refer to "processor" field on a request.
|
void |
init(Settings settings)
Initialize the
OpProcessor with settings from the server. |
Optional<ThrowingConsumer<Context>> |
selectOther(RequestMessage requestMessage)
A sub-class may have additional "ops" that it will service.
|
evalOpInternal, select, validateEvalMessage
attemptCommit, attemptRollback, generateMetaData, handleIterator, isForceFlushed, iterateComplete, makeFrame, makeFrame
public static final String OP_PROCESSOR_NAME
protected final Function<Context,AbstractEvalOpProcessor.BindingSupplier> bindingMaker
public String getName()
OpProcessor
public void init(Settings settings)
OpProcessor
OpProcessor
with settings from the server. This method should only be called once at
server startup by a single thread.public ThrowingConsumer<Context> getEvalOp()
AbstractEvalOpProcessor
getEvalOp
in class AbstractEvalOpProcessor
public Optional<ThrowingConsumer<Context>> selectOther(RequestMessage requestMessage) throws OpProcessorException
AbstractEvalOpProcessor
AbstractEvalOpProcessor.select(Context)
that are not
handled will be passed to this method to see if the sub-class can service the requested op code.selectOther
in class AbstractEvalOpProcessor
OpProcessorException
protected Function<Context,AbstractEvalOpProcessor.BindingSupplier> getBindingMaker()
evalOp(Context)
to create the final argument to
AbstractEvalOpProcessor.evalOpInternal(Context, Supplier, org.apache.tinkerpop.gremlin.server.op.AbstractEvalOpProcessor.BindingSupplier)
.
In this way an extending class can use the default AbstractEvalOpProcessor.BindingSupplier
which carries a lot of re-usable functionality or provide a new one to override the existing approach.Copyright © 2013–2018 Apache Software Foundation. All rights reserved.