Example usage for org.springframework.data.gemfire PartitionAttributesFactoryBean setLocalMaxMemory

List of usage examples for org.springframework.data.gemfire PartitionAttributesFactoryBean setLocalMaxMemory

Introduction

In this page you can find the example usage for org.springframework.data.gemfire PartitionAttributesFactoryBean setLocalMaxMemory.

Prototype

public void setLocalMaxMemory(int mb) 

Source Link

Usage

From source file:org.spring.data.gemfire.config.GemFireConfiguration.java

@Bean
public PartitionAttributesFactoryBean defaultPartitionAttributes(
        @Value("${app.gemfire.defaults.region.partition.local-max-memory}") int localMaxMemory,
        @Value("${app.gemfire.defaults.region.partition.total-max-memory}") int totalMaxMemory) {
    PartitionAttributesFactoryBean partitionAttributes = new PartitionAttributesFactoryBean();
    partitionAttributes.setLocalMaxMemory(localMaxMemory);
    partitionAttributes.setTotalMaxMemory(totalMaxMemory);
    return partitionAttributes;
}

From source file:org.spring.data.gemfire.app.context.config.PeerCacheConfiguration.java

@Bean
public PartitionAttributesFactoryBean examplePartitionAttributes(
        @Value("${app.gemfire.region.partition.local-max-memory}") int localMaxMemory,
        @Value("${app.gemfire.region.partition.total-max-memory}") int totalMaxMemory) {
    PartitionAttributesFactoryBean partitionAttributes = new PartitionAttributesFactoryBean();

    partitionAttributes.setLocalMaxMemory(localMaxMemory);
    partitionAttributes.setTotalMaxMemory(totalMaxMemory);

    return partitionAttributes;
}