Class OpLoader
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.server.op.OpLoader
-
public final class OpLoader extends Object
UsesServiceLoaderto loadOpProcessorinstances into a cache.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
-
Constructor Summary
Constructors Constructor Description OpLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<OpProcessor>getProcessor(String name)Gets anOpProcessorby its name.static Map<String,OpProcessor>getProcessors()Gets a read-only map of the processors where the key is theOpProcessorname and the value is the instance created byServiceLoader.static voidinit(Settings settings)Initialize theOpLoaderwith server settings.static voidreset()Reset the processors so that they can be re-initialized with different settings which is useful in testing scenarios.
-
-
-
Method Detail
-
init
public static void init(Settings settings)
Initialize theOpLoaderwith server settings. This method should only be called once at startup but is designed to be idempotent.
-
getProcessor
public static Optional<OpProcessor> getProcessor(String name)
Gets anOpProcessorby its name. If it cannot be found anOptional.empty()is returned.
-
getProcessors
public static Map<String,OpProcessor> getProcessors()
Gets a read-only map of the processors where the key is theOpProcessorname and the value is the instance created byServiceLoader.
-
reset
public static void reset()
Reset the processors so that they can be re-initialized with different settings which is useful in testing scenarios.
-
-