private DiskStoreFactory toDiskStoreFactory(DiskRegionProperties diskRegionProperties) {
    DiskStoreFactory diskStoreFactory = cache.createDiskStoreFactory();

    diskStoreFactory.setAllowForceCompaction(diskRegionProperties.getAllowForceCompaction());
    diskStoreFactory.setAutoCompact(diskRegionProperties.isRolling());
    diskStoreFactory.setCompactionThreshold(diskRegionProperties.getCompactionThreshold());

    if (diskRegionProperties.getDiskDirSizes() == null) {
      int[] diskDirSizes = new int[diskRegionProperties.getDiskDirs().length];
      Arrays.fill(diskDirSizes, Integer.MAX_VALUE);
      diskStoreFactory.setDiskDirsAndSizes(diskRegionProperties.getDiskDirs(), diskDirSizes);
    } else {
      diskStoreFactory.setDiskDirsAndSizes(diskRegionProperties.getDiskDirs(),
          diskRegionProperties.getDiskDirSizes());
    }

    if (diskRegionProperties.getBytesThreshold() > Integer.MAX_VALUE) {
      diskStoreFactory.setQueueSize(Integer.MAX_VALUE);
    } else {
      diskStoreFactory.setQueueSize((int) diskRegionProperties.getBytesThreshold());
    }

    if (diskRegionProperties.getTimeInterval() != -1) {
      diskStoreFactory.setTimeInterval(diskRegionProperties.getTimeInterval());
    }

    return diskStoreFactory;
  }
Regression test for TRAC #41770: ConcurrentRegionOperationsJUnitTest fails with duplicate
create in an oplog
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionJUnitTest.java