private Region createAsyncRegionWithSmallQueue(final VM vm0) { Cache cache = getCache(); DiskStoreFactoryImpl dsf = (DiskStoreFactoryImpl) cache.createDiskStoreFactory(); File dir = getDiskDirForVM(vm0); dir.mkdirs(); dsf.setDiskDirs(new File[] {dir}); dsf.setMaxOplogSizeInBytes(500); dsf.setQueueSize(1000); dsf.setTimeInterval(1000); DiskStore ds = dsf.create(REGION_NAME); RegionFactory rf = new RegionFactory(); rf.setDiskStoreName(ds.getName()); rf.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE); rf.setScope(Scope.DISTRIBUTED_ACK); rf.setDiskSynchronous(false); Region region = rf.create(REGION_NAME); return region; }
public DiskStoreFactoryImpl(Cache cache, DiskStoreAttributes attrs) { this.attrs.name = attrs.name; setAutoCompact(attrs.getAutoCompact()); setAllowForceCompaction(attrs.getAllowForceCompaction()); setCompactionThreshold(attrs.getCompactionThreshold()); setMaxOplogSizeInBytes(attrs.getMaxOplogSizeInBytes()); setTimeInterval(attrs.getTimeInterval()); setWriteBufferSize(attrs.getWriteBufferSize()); setQueueSize(attrs.getQueueSize()); setDiskDirs(cloneArray(attrs.getDiskDirs())); setDiskDirsAndSizes(cloneArray(attrs.getDiskDirs()), cloneArray(attrs.getDiskDirSizes())); setSyncWrites(attrs.getSyncWrites()); this.cache = cache; }
public DiskStoreFactoryImpl(Cache cache, DiskStoreAttributes attrs) { this.attrs.name = attrs.name; setAutoCompact(attrs.getAutoCompact()); setAllowForceCompaction(attrs.getAllowForceCompaction()); setCompactionThreshold(attrs.getCompactionThreshold()); setMaxOplogSizeInBytes(attrs.getMaxOplogSizeInBytes()); setTimeInterval(attrs.getTimeInterval()); setWriteBufferSize(attrs.getWriteBufferSize()); setQueueSize(attrs.getQueueSize()); setDiskDirs(cloneArray(attrs.getDiskDirs())); setDiskDirsAndSizes(cloneArray(attrs.getDiskDirs()), cloneArray(attrs.getDiskDirSizes())); setDiskUsageWarningPercentage(attrs.getDiskUsageWarningPercentage()); setDiskUsageCriticalPercentage(attrs.getDiskUsageCriticalPercentage()); this.cache = cache; }