org.apache.tinkerpop.gremlin.jsr223

## Class LazyBindingsCustomizer

- java.lang.Object
- - org.apache.tinkerpop.gremlin.jsr223.LazyBindingsCustomizer

- All Implemented Interfaces:
    BindingsCustomizer, Customizer

      public class LazyBindingsCustomizer
      extends Object
      implements BindingsCustomizer

  A customizer implementation that provides bindings to a `GremlinScriptEngine` in the `ScriptContext.GLOBAL_SCOPE`.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LazyBindingsCustomizer(Supplier<Bindings> bindingsSupplier)` Creates a new object with `ScriptContext.GLOBAL_SCOPE`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Bindings` | `getBindings()` Gets the bindings to add to a `GremlinScriptEngine`.
    `int` | `getScope()` Gets the scope to which the bindings apply.

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

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

- - ### Constructor Detail

    - #### LazyBindingsCustomizer

          public LazyBindingsCustomizer(Supplier<Bindings> bindingsSupplier)

      Creates a new object with `ScriptContext.GLOBAL_SCOPE`.

  - ### Method Detail

    - #### getBindings

          public Bindings getBindings()

      Description copied from interface: `BindingsCustomizer`
      Gets the bindings to add to a `GremlinScriptEngine`.
      Specified by:
        `getBindings` in interface `BindingsCustomizer`

    - #### getScope

          public int getScope()

      Description copied from interface: `BindingsCustomizer`
      Gets the scope to which the bindings apply. The scope is determined by the `ScriptContext` values where "100" is `EngineScope` (bindings apply to the current `GremlinScriptEngine`) and "200" is `GlobalScope` (bindings apply to the engines created by the current `GremlinScriptEngineManager`.
      Specified by:
        `getScope` in interface `BindingsCustomizer`

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