Code example for Properties

Methods: setProperty

0
public class ESEmbeddedServer { 
 
    private final Node node;
 
    public ESEmbeddedServer(String clusterName, String dataPath, String httpRange, String transportRange) {
        Properties props = new Properties();
        props.setProperty("path.data", dataPath);
        props.setProperty("http.port", httpRange);
        props.setProperty("transport.tcp.port", transportRange);
        props.setProperty("es.index.store.type", "memory");
        props.setProperty("gateway.type", "none");
 
        Settings settings = ImmutableSettings.settingsBuilder().put(props).build();
        node = NodeBuilder.nodeBuilder().local(false).client(false).settings(settings).clusterName(clusterName).build();
    } 
 
    public void start() { 
        node.start();
    } 
 
    public void stop() {