Class OpLoader
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.server.op.OpLoader
-
public final class OpLoader extends Object
UsesServiceLoader
to loadOpProcessor
instances 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 anOpProcessor
by its name.static Map<String,OpProcessor>
getProcessors()
Gets a read-only map of the processors where the key is theOpProcessor
name and the value is the instance created byServiceLoader
.static void
init(Settings settings)
Initialize theOpLoader
with server settings.static void
reset()
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 theOpLoader
with 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 anOpProcessor
by 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 theOpProcessor
name 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.
-
-