DATAES-6 flag name changed to purge-data-on-shutdown from data

This commit is contained in:
Mohsin Husen 2013-05-07 13:49:13 +01:00
parent cc735e5b46
commit 73fea2ba06
4 changed files with 7 additions and 7 deletions

View File

@ -36,7 +36,7 @@ public class NodeClientFactoryBean implements FactoryBean<NodeClient>, Initializ
private static final Logger logger = LoggerFactory.getLogger(NodeClientFactoryBean.class);
private boolean local;
private boolean data;
private boolean purgeDataOnShutdown;
private NodeClient nodeClient;
NodeClientFactoryBean() {
@ -63,15 +63,15 @@ public class NodeClientFactoryBean implements FactoryBean<NodeClient>, Initializ
@Override
public void afterPropertiesSet() throws Exception {
nodeClient = (NodeClient) nodeBuilder().local(this.local).data(this.data).node().client();
nodeClient = (NodeClient) nodeBuilder().local(this.local).data(this.purgeDataOnShutdown).node().client();
}
public void setLocal(boolean local) {
this.local = local;
}
public void setData(boolean data) {
this.data = data;
public void setPurgeDataOnShutdown(boolean purgeDataOnShutdown) {
this.purgeDataOnShutdown = purgeDataOnShutdown;
}
@Override

View File

@ -41,7 +41,7 @@ public class NodeClientBeanDefinitionParser extends AbstractBeanDefinitionParser
private void setLocalSettings(Element element, BeanDefinitionBuilder builder) {
builder.addPropertyValue("local", Boolean.valueOf(element.getAttribute("local")));
builder.addPropertyValue("data", Boolean.valueOf(element.getAttribute("data")));
builder.addPropertyValue("purgeDataOnShutdown", Boolean.valueOf(element.getAttribute("purge-data-on-shutdown")));
}

View File

@ -45,7 +45,7 @@
<xsd:complexContent>
<xsd:extension base="beans:identifiedType">
<xsd:attribute name="local" type="xsd:boolean" default="false"/>
<xsd:attribute name="data" type="xsd:boolean" default="false"/>
<xsd:attribute name="purge-data-on-shutdown" type="xsd:boolean" default="false"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>

View File

@ -5,6 +5,6 @@
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<elasticsearch:node-client id="client" local="true" data="false" />
<elasticsearch:node-client id="client" local="true" purge-data-on-shutdown="false" />
</beans>