public static DiskId createDiskId(long maxOplogSize, boolean isPersistenceType,
      boolean needsLinkedList) {
    long bytes = maxOplogSize * 1024 * 1024;
    if (bytes > Integer.MAX_VALUE) {
      if (isPersistenceType) {
        if (needsLinkedList) {
          return new PersistenceWithLongOffset();
        } else {
          return new PersistenceWithLongOffsetNoLL();
        }
      } else {
        if (needsLinkedList) {
          return new OverflowOnlyWithLongOffset();
        } else {
          return new OverflowOnlyWithLongOffsetNoLL();
        }
      }
    } else {
      if (isPersistenceType) {
        if (needsLinkedList) {
          return new PersistenceWithIntOffset();
        } else {
          return new PersistenceWithIntOffsetNoLL();
        }
      } else {
        if (needsLinkedList) {
          return new OverflowOnlyWithIntOffset();
        } else {
          return new OverflowOnlyWithIntOffsetNoLL();
        }
      }
    }
  }
Creates appropriate instance of DiskId depending upon the maxOplogSize set by the user. If the
maxOplogSize (in bytes) is greater than Integer.MAX_VALUE, LongOplogOffsetDiskId will be
created and for maxOplogSize lesser than that, IntOplogOffsetDiskId will be created.

@return the disk-id instance created.
geode-core/src/main/java/org/apache/geode/internal/cache/DiskId.java