From a5dc0fcf9a114b1381de39564b654bae6306c076 Mon Sep 17 00:00:00 2001 From: kimchy Date: Mon, 29 Mar 2010 11:03:36 +0300 Subject: [PATCH] javadoc --- .../elasticsearch/plugins/AbstractPlugin.java | 20 ++++++++++++++ .../org/elasticsearch/plugins/Plugin.java | 26 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/AbstractPlugin.java b/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/AbstractPlugin.java index 3447fbb051b..9765beee1f2 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/AbstractPlugin.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/AbstractPlugin.java @@ -27,30 +27,50 @@ import org.elasticsearch.util.component.LifecycleComponent; import java.util.Collection; /** + * A base class for a plugin. + * * @author kimchy (shay.banon) */ public abstract class AbstractPlugin implements Plugin { + /** + * Defaults to return an empty list. + */ @Override public Collection> modules() { return ImmutableList.of(); } + /** + * Defaults to return an empty list. + */ @Override public Collection> services() { return ImmutableList.of(); } + /** + * Defaults to return an empty list. + */ @Override public Collection> indexModules() { return ImmutableList.of(); } + /** + * Defaults to return an empty list. + */ @Override public Collection> indexServices() { return ImmutableList.of(); } + /** + * Defaults to return an empty list. + */ @Override public Collection> shardModules() { return ImmutableList.of(); } + /** + * Defaults to return an empty list. + */ @Override public Collection> shardServices() { return ImmutableList.of(); } diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/Plugin.java b/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/Plugin.java index 582515c6c35..f8d60b02905 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/Plugin.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/plugins/Plugin.java @@ -26,23 +26,49 @@ import org.elasticsearch.util.component.LifecycleComponent; import java.util.Collection; /** + * An extension point allowing to plug in custom functionality. + * * @author kimchy (shay.banon) */ public interface Plugin { + /** + * The name of the plugin. + */ String name(); + /** + * The description of the plugin. + */ String description(); + /** + * Server level modules. + */ Collection> modules(); + /** + * Server level services that will be automatically started/stopped/closed. + */ Collection> services(); + /** + * Per index modules. + */ Collection> indexModules(); + /** + * Per index services that will be automatically closed. + */ Collection> indexServices(); + /** + * Per index shard module. + */ Collection> shardModules(); + /** + * Per index shard service that will be automatically closed. + */ Collection> shardServices(); }