Example usage for org.springframework.data.gemfire CacheFactoryBean setUseClusterConfiguration

List of usage examples for org.springframework.data.gemfire CacheFactoryBean setUseClusterConfiguration

Introduction

In this page you can find the example usage for org.springframework.data.gemfire CacheFactoryBean setUseClusterConfiguration.

Prototype

public void setUseClusterConfiguration(Boolean useSharedConfiguration) 

Source Link

Document

Sets the state of the use-shared-configuration Pivotal GemFire/Apache Geode distribution configuration setting.

Usage

From source file:io.pivotal.example.java.SpringGemFireJavaBasedApplication.java

@Bean
CacheFactoryBean gemfireCache(@Qualifier("gemfireProperties") Properties gemfireProperties) {
    CacheFactoryBean gemfireCache = new CacheFactoryBean();

    gemfireCache.setClose(true);/*w w  w. j ava 2  s  .  c o  m*/
    gemfireCache.setProperties(gemfireProperties);
    gemfireCache.setUseBeanFactoryLocator(false);
    gemfireCache.setUseClusterConfiguration(true);

    return gemfireCache;
}

From source file:io.pivotal.example.SpringGemFireApplication.java

@Bean
CacheFactoryBean gemfireCache(@Qualifier("gemfireProperties") Properties gemfireProperties) {
    CacheFactoryBean gemfireCache = new CacheFactoryBean();

    gemfireCache.setClose(true);// www .  j  a  va2s  . c o m
    gemfireCache.setProperties(gemfireProperties);
    gemfireCache.setUseBeanFactoryLocator(true);
    gemfireCache.setUseClusterConfiguration(true);

    return gemfireCache;
}