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();
      }
    }
  }
}

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 .
