Example usage for org.springframework.data.gemfire IndexFactoryBean setIgnoreIfExists

List of usage examples for org.springframework.data.gemfire IndexFactoryBean setIgnoreIfExists

Introduction

In this page you can find the example usage for org.springframework.data.gemfire IndexFactoryBean setIgnoreIfExists.

Prototype

public void setIgnoreIfExists(boolean ignore) 

Source Link

Document

Configures whether to ignore the Index defined by this IndexFactoryBean when an IndexExistsException or IndexNameConflictException is thrown.

Usage

From source file:org.springframework.data.gemfire.IndexFactoryBeanTest.java

@Test
public void setAndIsIgnoreIfExists() {

    IndexFactoryBean indexFactoryBean = newIndexFactoryBean();

    assertThat(indexFactoryBean.isIgnoreIfExists()).isFalse();

    indexFactoryBean.setIgnoreIfExists(true);

    assertThat(indexFactoryBean.isIgnoreIfExists()).isTrue();

    indexFactoryBean.setIgnoreIfExists(false);

    assertThat(indexFactoryBean.isIgnoreIfExists()).isFalse();
}