org.apache.tinkerpop.gremlin.server.op

## Class OpLoader

- java.lang.Object
- - org.apache.tinkerpop.gremlin.server.op.OpLoader

-     public final class OpLoader
      extends Object

  Uses `ServiceLoader` to load `OpProcessor` instances into a cache.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OpLoader()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Optional<OpProcessor>` | `getProcessor(String name)` Gets an `OpProcessor` by its name.
    `static Map<String,OpProcessor>` | `getProcessors()` Gets a read-only map of the processors where the key is the `OpProcessor` name and the value is the instance created by `ServiceLoader`.
    `static void` | `init(Settings settings)` Initialize the `OpLoader` 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.

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

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

- - ### Constructor Detail

    - #### OpLoader

          public OpLoader()

  - ### Method Detail

    - #### init

          public static void init(Settings settings)

      Initialize the `OpLoader` 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 an `OpProcessor` by its name. If it cannot be found an `Optional.EMPTY` is returned.

    - #### getProcessors

          public static Map<String,OpProcessor> getProcessors()

      Gets a read-only map of the processors where the key is the `OpProcessor` name and the value is the instance created by `ServiceLoader`.

    - #### reset

          public static void reset()

      Reset the processors so that they can be re-initialized with different settings which is useful in testing scenarios.

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