blob: eeadd4e8cd2f34c92214b9d75455910b4f424e9f [file] [log] [blame]
/*=========================================================================
* Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
* This product is protected by U.S. and international copyright
* and intellectual property laws. Pivotal products are covered by
* one or more patents listed at http://www.pivotal.io/patents.
*=========================================================================
*/
/*
* Created on Mar 3, 2006
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.DiskStoreFactory;
import java.io.File;
import java.util.Arrays;
/**
* A properties object used to create persistent/overflow regions for
* testing objects
*
* @author Mitul
* @since 5.1
*
*/
public class DiskRegionProperties
{
private boolean isPersistBackup = false;
private boolean isOverflow = false;
private int overFlowCapacity = 1000;
private int compactionThreshold = 50;
private File[] diskDirs;
private int[] diskDirSize;
private long timeInterval = -1L;
private long bytesThreshold = 0L;
private boolean isRolling = true;
private boolean allowForceCompaction = false;
private long maxOplogSize = 1024*1024*1024*10L;
private boolean isSynchronous = false;
private String regionName = "testRegion";
private int concurrencyLevel = 16;
private int initialCapacity = 16;
private float loadFactor = 0.75f;
private boolean statisticsEnabled = false;
public DiskRegionProperties() {
}
public long getBytesThreshold()
{
return bytesThreshold;
}
public File[] getDiskDirs()
{
return diskDirs;
}
public boolean isOverflow()
{
return isOverflow;
}
public boolean isPersistBackup()
{
return isPersistBackup;
}
public boolean isRolling()
{
return isRolling;
}
public boolean getAllowForceCompaction() {
return this.allowForceCompaction;
}
public int getCompactionThreshold() {
return this.compactionThreshold;
}
public boolean isSynchronous()
{
return isSynchronous;
}
public long getMaxOplogSize()
{
return maxOplogSize;
}
public int getOverFlowCapacity()
{
return overFlowCapacity;
}
public long getTimeInterval()
{
return timeInterval;
}
public int[] getDiskDirSizes()
{
return diskDirSize;
}
public void setDiskDirsAndSizes(File[] diskDirs, int[] diskDirSize){
this.diskDirs = diskDirs;
if (diskDirs == null) {
this.diskDirSize = null;
} else {
this.diskDirSize = diskDirSize;
}
}
public void setBytesThreshold(long bytesThreshold)
{
this.bytesThreshold = bytesThreshold;
}
public void setDiskDirs(File[] diskDirs)
{
if (diskDirs == null) {
this.diskDirs = null;
this.diskDirSize = null;
return;
}
this.diskDirs = diskDirs;
}
public void setOverflow(boolean isOverflow)
{
this.isOverflow = isOverflow;
}
public void setPersistBackup(boolean isPersistBackup)
{
this.isPersistBackup = isPersistBackup;
}
public void setRolling(boolean isRolling)
{
this.isRolling = isRolling;
}
public void setAllowForceCompaction(boolean v) {
this.allowForceCompaction = v;
}
public void setCompactionThreshold(int v) {
this.compactionThreshold = v;
}
public void setSynchronous(boolean isSynchronous)
{
this.isSynchronous = isSynchronous;
}
public void setMaxOplogSize(long maxOplogSize)
{
this.maxOplogSize = maxOplogSize;
}
public void setOverFlowCapacity(int overFlowCapacity)
{
this.overFlowCapacity = overFlowCapacity;
}
public void setTimeInterval(long timeInterval)
{
this.timeInterval = timeInterval;
}
public String getRegionName()
{
return regionName;
}
public void setRegionName(String regionName)
{
this.regionName = regionName;
}
public void setStatisticsEnabled(boolean v) {
this.statisticsEnabled = v;
}
public boolean getStatisticsEnabled() {
return this.statisticsEnabled;
}
public void setConcurrencyLevel(int v) {
this.concurrencyLevel = v;
}
public int getConcurrencyLevel() {
return this.concurrencyLevel;
}
public void setInitialCapacity(int v) {
this.initialCapacity = v;
}
public int getInitialCapacity() {
return this.initialCapacity;
}
public void setLoadFactor(float v) {
this.loadFactor = v;
}
public float getLoadFactor() {
return this.loadFactor;
}
}