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
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, evalOpInternal, select, validateEvalMessage
attemptCommit, attemptRollback, generateMetaData, handleIterator, 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
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.selectOther
in class AbstractEvalOpProcessor
OpProcessorException
protected Function<Context,AbstractEvalOpProcessor.BindingSupplier> getBindingMaker()
evalOp(Context)
to create the final argument to
AbstractEvalOpProcessor.evalOpInternal(Context, Supplier, 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–2020 Apache Software Foundation. All rights reserved.