org.apache.tinkerpop.gremlin.groovy.engine

## Class GremlinExecutor.LifeCycle.Builder

- java.lang.Object
- - org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.LifeCycle.Builder

- Enclosing class:
    GremlinExecutor.LifeCycle

      public static class GremlinExecutor.LifeCycle.Builder
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Builder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `GremlinExecutor.LifeCycle.Builder` | `afterFailure(BiConsumer<Bindings,Throwable> afterFailure)` Specifies the function to execute if the script evaluation fails.
    `GremlinExecutor.LifeCycle.Builder` | `afterSuccess(Consumer<Bindings> afterSuccess)` Specifies the function to execute after result transformations.
    `GremlinExecutor.LifeCycle.Builder` | `afterTimeout(Consumer<Bindings> afterTimeout)` Specifies the function to execute if the script evaluation times out.
    `GremlinExecutor.LifeCycle.Builder` | `beforeEval(Consumer<Bindings> beforeEval)` Specifies the function to execute prior to the script being evaluated.
    `GremlinExecutor.LifeCycle` | `create()`
    `GremlinExecutor.LifeCycle.Builder` | `scriptEvaluationTimeoutOverride(Long scriptEvaluationTimeoutOverride)` An override to the global `scriptEvaluationTimeout` setting on the script engine.
    `GremlinExecutor.LifeCycle.Builder` | `transformResult(Function<Object,Object> transformResult)` Specifies the function to execute on the result of the script evaluation just after script evaluation returns but before the script evaluation is marked as complete.
    `GremlinExecutor.LifeCycle.Builder` | `withResult(Consumer<Object> withResult)` Specifies the function to execute on the result of the script evaluation just after script evaluation returns but before the script evaluation is marked as complete.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Builder

          public Builder()

  - ### Method Detail

    - #### beforeEval

          public GremlinExecutor.LifeCycle.Builder beforeEval(Consumer<Bindings> beforeEval)

      Specifies the function to execute prior to the script being evaluated. This function can also be specified globally on `GremlinExecutor.Builder.beforeEval(Consumer)`.

    - #### transformResult

          public GremlinExecutor.LifeCycle.Builder transformResult(Function<Object,Object> transformResult)

      Specifies the function to execute on the result of the script evaluation just after script evaluation returns but before the script evaluation is marked as complete.

    - #### withResult

          public GremlinExecutor.LifeCycle.Builder withResult(Consumer<Object> withResult)

      Specifies the function to execute on the result of the script evaluation just after script evaluation returns but before the script evaluation is marked as complete.

    - #### afterSuccess

          public GremlinExecutor.LifeCycle.Builder afterSuccess(Consumer<Bindings> afterSuccess)

      Specifies the function to execute after result transformations. This function can also be specified globally on `GremlinExecutor.Builder.afterSuccess(Consumer)`. The script evaluation will be marked as "complete" after this method.

    - #### afterTimeout

          public GremlinExecutor.LifeCycle.Builder afterTimeout(Consumer<Bindings> afterTimeout)

      Specifies the function to execute if the script evaluation times out. This function can also be specified globally on `GremlinExecutor.Builder.afterTimeout(Consumer)`.

    - #### afterFailure

          public GremlinExecutor.LifeCycle.Builder afterFailure(BiConsumer<Bindings,Throwable> afterFailure)

      Specifies the function to execute if the script evaluation fails. This function can also be specified globally on `GremlinExecutor.Builder.afterFailure(BiConsumer)`.

    - #### scriptEvaluationTimeoutOverride

          public GremlinExecutor.LifeCycle.Builder scriptEvaluationTimeoutOverride(Long scriptEvaluationTimeoutOverride)

      An override to the global `scriptEvaluationTimeout` setting on the script engine. If this value is set to `null` (the default) it will use the global setting.

    - #### create

          public GremlinExecutor.LifeCycle create()

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.