code: public static long parseTimeStamp(String fileName) {
          if (fileName == null || fileName.isEmpty()) {
              return -1L;
          }
          int pidIndex = fileName.indexOf(TIMESEPARATOR);
          int labelIndex = fileName.indexOf(LABELSEPARATOR);
          // If no time separator or it's a part of the label there's no timestamp
          if (pidIndex < 0 || (labelIndex > 0 && labelIndex < pidIndex)) {
              return -1L;
          }
          try {
              return Long.parseLong(fileName.substring(0, pidIndex));
          } catch (NumberFormatException ex) {
              return -1L;
          }
      }
docs: Retrieves the timestamp out of the directory name.
  
  example: directory file name for a serverinstance would be <repos_timestamp>_<pid>-<label>
  
  returned would be <repos_timestamp>