Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Plugin API for constructing modules #12952

Merged
merged 6 commits into from
Aug 18, 2015

Commits on Aug 18, 2015

  1. Plugins: Simplify Plugin API for constructing modules

    The Plugin interface currently contains 6 different methods for
    adding modules. Elasticsearch has 3 different levels of injectors,
    and for each of those, there are two methods. The first takes no
    arguments and returns a collection of class objects to construct. The
    second takes a Settings object and returns a collection of module
    objects already constructed. The settings argument is unecessary because
    the plugin can already get the settings from its constructor. Removing
    that, the only difference between the two versions is returning an
    already constructed Module, or a module Class, and there is no reason
    the plugin can't construct all their modules themselves.
    
    This change reduces the plugin api down to just 3 methods for adding
    modules. Each returns a Collection<Module>. It also removes the
    processModule method, which was unnecessary since onModule
    implementations fullfill the same requirement. And finally, it renames
    the modules() method to nodeModules() so it is clear these are created
    once for each node.
    rjernst committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    2bf8459 View commit details
    Browse the repository at this point in the history
  2. Merged AbstractPlugin and Plugin. Also added Settings back to

    indexModules and shardModules
    rjernst committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    dc1fa67 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e61c5ce View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c3a22e6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7393068 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    54ae556 View commit details
    Browse the repository at this point in the history