From e87a4117b667b234dbe968724f6110e33f52baf6 Mon Sep 17 00:00:00 2001 From: kimchy Date: Thu, 13 May 2010 15:17:49 +0300 Subject: [PATCH] expose settings builder in the node builder API --- .../java/org/elasticsearch/node/NodeBuilder.java | 14 ++++++++++++++ .../elasticsearch/groovy/node/GNodeBuilder.groovy | 6 +++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/node/NodeBuilder.java b/modules/elasticsearch/src/main/java/org/elasticsearch/node/NodeBuilder.java index 7c78e41ca17..09b281bafb7 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/node/NodeBuilder.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/node/NodeBuilder.java @@ -68,6 +68,20 @@ public class NodeBuilder { return new NodeBuilder(); } + /** + * Set addition settings simply by working directly against the settings builder. + */ + public ImmutableSettings.Builder settings() { + return settings; + } + + /** + * Set addition settings simply by working directly against the settings builder. + */ + public ImmutableSettings.Builder getSettings() { + return settings; + } + /** * Explicit node settings to set. */ diff --git a/plugins/client/groovy/src/main/groovy/org/elasticsearch/groovy/node/GNodeBuilder.groovy b/plugins/client/groovy/src/main/groovy/org/elasticsearch/groovy/node/GNodeBuilder.groovy index b99cdd150b5..d6aa8e92015 100644 --- a/plugins/client/groovy/src/main/groovy/org/elasticsearch/groovy/node/GNodeBuilder.groovy +++ b/plugins/client/groovy/src/main/groovy/org/elasticsearch/groovy/node/GNodeBuilder.groovy @@ -27,7 +27,7 @@ import org.elasticsearch.util.settings.Settings import org.elasticsearch.util.settings.loader.JsonSettingsLoader /** - * The node builder allow to build a {@link GNode} instance. + * The node builder allow to build a {@link GNode} instance. * * @author kimchy (shay.banon) */ @@ -41,6 +41,10 @@ public class GNodeBuilder { new GNodeBuilder() } + public ImmutableSettings.Builder getSettings() { + return settingsBuilder; + } + def settings(Settings.Builder settings) { settingsBuilder.put(settings.build()) }