Example usage for org.springframework.data.gemfire.server CacheServerFactoryBean setNotifyBySubscription

List of usage examples for org.springframework.data.gemfire.server CacheServerFactoryBean setNotifyBySubscription

Introduction

In this page you can find the example usage for org.springframework.data.gemfire.server CacheServerFactoryBean setNotifyBySubscription.

Prototype

public void setNotifyBySubscription(boolean notifyBySubscription) 

Source Link

Usage

From source file:sample.server.GemFireServer.java

@Bean
CacheServerFactoryBean gemfireCacheServer(Cache gemfireCache,
        @Value("${gemfire.cache.server.bind-address:localhost}") String bindAddress,
        @Value("${gemfire.cache.server.hostname-for-clients:localhost}") String hostnameForClients,
        @Value("${gemfire.cache.server.port:12480}") int port) { // <4>

    CacheServerFactoryBean gemfireCacheServer = new CacheServerFactoryBean();

    gemfireCacheServer.setAutoStartup(true);
    gemfireCacheServer.setCache(gemfireCache);
    gemfireCacheServer.setBindAddress(bindAddress);
    gemfireCacheServer.setHostNameForClients(hostnameForClients);
    gemfireCacheServer.setMaxTimeBetweenPings(Long.valueOf(TimeUnit.MINUTES.toMillis(1)).intValue());
    gemfireCacheServer.setNotifyBySubscription(true);
    gemfireCacheServer.setPort(port);//from   ww w .j  a  v  a  2  s.co  m

    return gemfireCacheServer;
}