Class AbstractOpProcessor

    • Field Detail

      • manageTransactions

        protected final boolean manageTransactions
        When set to true, transactions are always managed otherwise they can be overridden by the request.
    • Constructor Detail

      • AbstractOpProcessor

        protected AbstractOpProcessor​(boolean manageTransactions)
    • Method Detail

      • determineIfTemporaryException

        protected static Optional<Throwable> determineIfTemporaryException​(Throwable ex)
        Check if any exception in the chain is TemporaryException then we should respond with the right error code so that the client knows to retry.
      • handleIterator

        protected void handleIterator​(Context context,
                                      Iterator itty)
                               throws InterruptedException
        Provides a generic way of iterating a result set back to the client.
        context - The Gremlin Server Context object containing settings, request message, etc.
        itty - The result to iterator
      • iterateComplete

        protected void iterateComplete​( ctx,
                                       RequestMessage msg,
                                       Iterator itty)
        Called when iteration within 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.
      • isForceFlushed

        protected boolean isForceFlushed​( ctx,
                                         RequestMessage msg,
                                         Iterator itty)
        Determines if a Frame should be force flushed outside of the resultIterationBatchSize and the termination of the iterator. By default this method return false.
        itty - a reference to the current Iterator of results - it is not meant to be forwarded in this method