code: public synchronized static SegmentManager getInstance(String segmentHomePath, SegmentFactory segmentFactory, int segmentFileSizeMB) throws IOException {
          if (segmentFileSizeMB < Segment.minSegmentFileSizeMB) {
              throw new IllegalArgumentException("Invalid argument segmentFileSizeMB " + segmentFileSizeMB + ", smaller than " + Segment.minSegmentFileSizeMB);
          }
  
          if (segmentFileSizeMB > Segment.maxSegmentFileSizeMB) {
              throw new IllegalArgumentException("Invalid argument segmentFileSizeMB " + segmentFileSizeMB + ", greater than " + Segment.maxSegmentFileSizeMB);
          }
  
          File segDir = new File(segmentHomePath);
          if (!segDir.exists()) {
              if (!segDir.mkdirs()) {
                  throw new IOException("Failed to create directory " + segmentHomePath);
              }
          }
  
          if (segDir.isFile()) {
              throw new IOException("File " + segmentHomePath + " is not a directory");
          }
  
          String key = segDir.getCanonicalPath();
          SegmentManager mgr = _segManagerMap.get(key);
          if (mgr == null) {
              mgr = new SegmentManager(key, segmentFactory, segmentFileSizeMB);
              _segManagerMap.put(key, mgr);
          }
  
          mgr.open();
          return mgr;
      }
docs: Gets the instance of SegmentManager for the specified <code>segmentHomePath</code>.
  
  @param segmentHomePath   - the file path to segment home
  @param segmentFactory    - the segment factory
  @param segmentFileSizeMB - the segment file size in MB
  @return the instance of SegmentManager
  @throws IOException