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

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

Introduction

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

Prototype

public void setTotalMaxMemory(long megabytes) 

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;
}