Class LazyBindingsCustomizer
java.lang.Object
org.apache.tinkerpop.gremlin.jsr223.LazyBindingsCustomizer
- All Implemented Interfaces:
BindingsCustomizer,Customizer
A customizer implementation that provides bindings to a
GremlinScriptEngine in the
ScriptContext.GLOBAL_SCOPE.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
Constructor Summary
ConstructorsConstructorDescriptionLazyBindingsCustomizer(Supplier<Bindings> bindingsSupplier) Creates a new object withScriptContext.GLOBAL_SCOPE. -
Method Summary
Modifier and TypeMethodDescriptionGets the bindings to add to aGremlinScriptEngine.intgetScope()Gets the scope to which the bindings apply.
-
Constructor Details
-
LazyBindingsCustomizer
Creates a new object withScriptContext.GLOBAL_SCOPE.
-
-
Method Details
-
getBindings
Description copied from interface:BindingsCustomizerGets the bindings to add to aGremlinScriptEngine.- Specified by:
getBindingsin interfaceBindingsCustomizer
-
getScope
public int getScope()Description copied from interface:BindingsCustomizerGets the scope to which the bindings apply. The scope is determined by theScriptContextvalues where "100" isEngineScope(bindings apply to the currentGremlinScriptEngine) and "200" isGlobalScope(bindings apply to the engines created by the currentGremlinScriptEngineManager.- Specified by:
getScopein interfaceBindingsCustomizer
-