expose settings builder in the node builder API

This commit is contained in:
kimchy 2010-05-13 15:17:49 +03:00
parent f6777f1e03
commit e87a4117b6
2 changed files with 19 additions and 1 deletions

View File

@ -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.
*/

View File

@ -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())
}