mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-22 03:52:10 +00:00
DATAES-6 flag name changed to purge-data-on-shutdown from data
This commit is contained in:
parent
cc735e5b46
commit
73fea2ba06
@ -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
|
||||
|
@ -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")));
|
||||
}
|
||||
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
Loading…
x
Reference in New Issue
Block a user