Example usage for org.springframework.data.gemfire.client ClientRegionFactoryBean setShortcut

List of usage examples for org.springframework.data.gemfire.client ClientRegionFactoryBean setShortcut

Introduction

In this page you can find the example usage for org.springframework.data.gemfire.client ClientRegionFactoryBean setShortcut.

Prototype

public void setShortcut(ClientRegionShortcut shortcut) 

Source Link

Document

Initializes the DataPolicy of the Region client Region using the given ClientRegionShortcut .

Usage

From source file:example.app.config.client.EchoClientApplicationConfiguration.java

@Bean(name = "Echo")
ClientRegionFactoryBean<String, String> echoRegion(GemFireCache gemfireCache) {
    ClientRegionFactoryBean<String, String> echoRegion = new ClientRegionFactoryBean<>();

    echoRegion.setCache(gemfireCache);//from w  w  w  .j a  va2s  .  c o m
    echoRegion.setClose(false);
    echoRegion.setShortcut(ClientRegionShortcut.PROXY);

    return echoRegion;
}

From source file:org.spring.data.gemfire.app.main.SpringGemFireDataClient.java

@Bean(name = "People")
ClientRegionFactoryBean<Long, Person> peopleRegion(GemFireCache clientCache, Pool gemfirePool,
        RegionAttributes<Long, Person> peopleRegionAttributes) {
    ClientRegionFactoryBean<Long, Person> peopleRegion = new ClientRegionFactoryBean<>();

    peopleRegion.setAttributes(peopleRegionAttributes);
    peopleRegion.setCache(clientCache);//  w  w  w . j  av  a2s  . c  o  m
    peopleRegion.setClose(false);
    peopleRegion.setPool(gemfirePool);
    peopleRegion.setPersistent(false);
    peopleRegion.setShortcut(ClientRegionShortcut.PROXY);

    return peopleRegion;
}