Example usage for org.springframework.data.gemfire DiskStoreFactoryBean setAutoCompact

List of usage examples for org.springframework.data.gemfire DiskStoreFactoryBean setAutoCompact

Introduction

In this page you can find the example usage for org.springframework.data.gemfire DiskStoreFactoryBean setAutoCompact.

Prototype

public void setAutoCompact(Boolean autoCompact) 

Source Link

Usage

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

@Bean(name = "CustomersDataStore")
public DiskStoreFactoryBean exampleDiskStore(Cache gemfireCache) {
    DiskStoreFactoryBean customersDiskStore = new DiskStoreFactoryBean();
    customersDiskStore.setCache(gemfireCache);
    customersDiskStore.setBeanName("CustomerDataStore");
    customersDiskStore.setAutoCompact(true);
    customersDiskStore.setDiskDirs(Arrays.asList(new DiskDir("./gemfire/disk-stores/customers")));
    customersDiskStore.setCompactionThreshold(75);
    customersDiskStore.setMaxOplogSize(10);
    customersDiskStore.setQueueSize(100);
    customersDiskStore.setTimeInterval(300000);
    return customersDiskStore;
}