Interface PlacementPluginFactory<T extends PlacementPluginConfig>

    • Field Detail

      • PLUGIN_NAME

        static final String PLUGIN_NAME
        The key in the plugins registry under which this plugin and its configuration are defined.
        See Also:
        Constant Field Values
    • Method Detail

      • createPluginInstance

        PlacementPlugin createPluginInstance()
        Returns an instance of the plugin that will be repeatedly (and concurrently) called to compute placement. Multiple instances of a plugin can be used in parallel (for example if configuration has to change, but plugin instances with the previous configuration are still being used).

        If this method returns null then a simple default assignment strategy will be used (see SimplePlacementFactory).

      • configure

        default void configure​(T cfg)
        Default implementation is a no-op. Override to provide meaningful behavior if needed.
        Specified by:
        configure in interface ConfigurablePlugin<T extends PlacementPluginConfig>
        Parameters:
        cfg - value deserialized from JSON, not null.
      • getConfig

        default T getConfig()
        Return the configuration of the plugin. Default implementation returns null.