Skip to content

Commit 73fea2b

Browse files
committed
DATAES-6 flag name changed to purge-data-on-shutdown from data
1 parent cc735e5 commit 73fea2b

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/main/java/org/springframework/data/elasticsearch/client/NodeClientFactoryBean.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class NodeClientFactoryBean implements FactoryBean<NodeClient>, Initializ
3636

3737
private static final Logger logger = LoggerFactory.getLogger(NodeClientFactoryBean.class);
3838
private boolean local;
39-
private boolean data;
39+
private boolean purgeDataOnShutdown;
4040
private NodeClient nodeClient;
4141

4242
NodeClientFactoryBean() {
@@ -63,15 +63,15 @@ public boolean isSingleton() {
6363

6464
@Override
6565
public void afterPropertiesSet() throws Exception {
66-
nodeClient = (NodeClient) nodeBuilder().local(this.local).data(this.data).node().client();
66+
nodeClient = (NodeClient) nodeBuilder().local(this.local).data(this.purgeDataOnShutdown).node().client();
6767
}
6868

6969
public void setLocal(boolean local) {
7070
this.local = local;
7171
}
7272

73-
public void setData(boolean data) {
74-
this.data = data;
73+
public void setPurgeDataOnShutdown(boolean purgeDataOnShutdown) {
74+
this.purgeDataOnShutdown = purgeDataOnShutdown;
7575
}
7676

7777
@Override

src/main/java/org/springframework/data/elasticsearch/config/NodeClientBeanDefinitionParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected AbstractBeanDefinition parseInternal(Element element, ParserContext pa
4141

4242
private void setLocalSettings(Element element, BeanDefinitionBuilder builder) {
4343
builder.addPropertyValue("local", Boolean.valueOf(element.getAttribute("local")));
44-
builder.addPropertyValue("data", Boolean.valueOf(element.getAttribute("data")));
44+
builder.addPropertyValue("purgeDataOnShutdown", Boolean.valueOf(element.getAttribute("purge-data-on-shutdown")));
4545
}
4646

4747

src/main/resources/org/springframework/data/elasticsearch/config/spring-elasticsearch-1.0.xsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<xsd:complexContent>
4646
<xsd:extension base="beans:identifiedType">
4747
<xsd:attribute name="local" type="xsd:boolean" default="false"/>
48-
<xsd:attribute name="data" type="xsd:boolean" default="false"/>
48+
<xsd:attribute name="purge-data-on-shutdown" type="xsd:boolean" default="false"/>
4949
</xsd:extension>
5050
</xsd:complexContent>
5151
</xsd:complexType>

src/test/resources/infrastructure.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch.xsd
66
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
77

8-
<elasticsearch:node-client id="client" local="true" data="false" />
8+
<elasticsearch:node-client id="client" local="true" purge-data-on-shutdown="false" />
99

1010
</beans>

0 commit comments

Comments
 (0)