public class TraversalOpProcessor extends AbstractOpProcessor
OpProcessor
implementation that iterates remotely submitted serialized Traversal
objects.Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_CACHE_EXPIRATION_TIME
Configuration setting for how long a cached side-effect will be available before it is evicted from the cache.
|
static String |
CONFIG_CACHE_MAX_SIZE
Configuration setting for the maximum number of entries the cache will have.
|
static long |
DEFAULT_CACHE_EXPIRATION_TIME
Default timeout for a cached side-effect is ten minutes.
|
static long |
DEFAULT_CACHE_MAX_SIZE
Default size of the max size of the cache.
|
static Settings.ProcessorSettings |
DEFAULT_SETTINGS |
static String |
OP_PROCESSOR_NAME |
static Timer |
traversalOpTimer |
manageTransactions
Constructor and Description |
---|
TraversalOpProcessor() |
Modifier and Type | Method and Description |
---|---|
protected void |
beforeProcessing(Graph graph,
Context ctx) |
void |
close() |
protected Map<String,Object> |
generateMetaData(ChannelHandlerContext ctx,
RequestMessage msg,
ResponseStatusCode code,
Iterator itty)
Generates meta-data to put on a
ResponseMessage . |
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. |
protected void |
iterateComplete(ChannelHandlerContext ctx,
RequestMessage msg,
Iterator itty)
Called when iteration within
AbstractOpProcessor.handleIterator(Context, Iterator) is on its final pass and the final
frame is about to be sent back to the client. |
protected void |
onError(Graph graph,
Context ctx) |
protected void |
onSideEffectSuccess(Graph graph,
Context ctx) |
protected void |
onTraversalSuccess(Graph graph,
Context ctx) |
ThrowingConsumer<Context> |
select(Context ctx)
Given the context (which contains the RequestMessage), return back a Consumer function that will be
executed with the context.
|
attemptCommit, attemptRollback, handleIterator, isForceFlushed, makeFrame, makeFrame
public static final String OP_PROCESSOR_NAME
public static final Timer traversalOpTimer
public static final Settings.ProcessorSettings DEFAULT_SETTINGS
public static final String CONFIG_CACHE_EXPIRATION_TIME
public static final long DEFAULT_CACHE_EXPIRATION_TIME
public static final String CONFIG_CACHE_MAX_SIZE
public static final long DEFAULT_CACHE_MAX_SIZE
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> select(Context ctx) throws OpProcessorException
OpProcessor
OpProcessorException
protected void iterateComplete(ChannelHandlerContext ctx, RequestMessage msg, Iterator itty)
AbstractOpProcessor
AbstractOpProcessor.handleIterator(Context, Iterator)
is on its final pass and the final
frame is about to be sent back to the client. This method only gets called on successful iteration of the
entire result.iterateComplete
in class AbstractOpProcessor
protected Map<String,Object> generateMetaData(ChannelHandlerContext ctx, RequestMessage msg, ResponseStatusCode code, Iterator itty)
AbstractOpProcessor
ResponseMessage
.generateMetaData
in class AbstractOpProcessor
itty
- a reference to the current Iterator
of results - it is not meant to be forwarded in
this methodCopyright © 2013–2016 Apache Software Foundation. All rights reserved.