com.hazelcast.instance

## Class NodeExtensionFactory

- java.lang.Object
- - com.hazelcast.instance.NodeExtensionFactory

-     @PrivateApi
      public final class NodeExtensionFactory
      extends Object

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static NodeExtension` | `create(Node node, List<String> extensionPriorityList)` Uses the Hazelcast ServiceLoader to discover all registered `NodeExtension` classes and identify the one to instantiate and use as the provided `node`'s extension.

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

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

- - ### Method Detail

    - #### create

          public static NodeExtension create(Node node,
                                             List<String> extensionPriorityList)

      Uses the Hazelcast ServiceLoader to discover all registered `NodeExtension` classes and identify the one to instantiate and use as the provided `node`'s extension. It chooses the class based on the provided priority list of class names, these are the rules:
      1. A class's priority is its zero-based index in the list.
      2. Lower number means higher priority.
      3. A class that doesn't appear in the list doesn't qualify for selection.

      The dynamic selection of the node extension allows Hazelcast Enterprise's JAR to be swapped in for the core Hazelcast JAR with no changes to user's code or configuration. Hazelcast core code can call this method with a priority list naming both the default and the enterprise node extension and it will automatically prefer the Enterprise one when present.

      The explicit priority list is necessary because a Hazelcast Jet JAR contains both the default node extension and the Jet node extension, but the one to choose depends on whether the user is requesting to start an IMDG or a Jet instance.

      Parameters:
        `node` - Hazelcast node whose extension this method must provide
        `extensionPriorityList` - priority list of fully qualified extension class names
      Returns:
        the selected node extension

Copyright © 2020. All rights reserved.