code: public void start(final SyncOptimizeManagerResultCallBack callback) {
          if (isRunning()) {
              throw new IllegalStateException(
                  "The start() method cannot be called when the sync optimize process is running.");
          }
  
          running = true;
  
          new Thread(new Runnable() {
              public void run() {
  
                  SyncOptimizeManager.this.reset();
  
                  SyncOptimizeConfig config = new SyncOptimizeConfig();
                  DuracloudConfiguration duracloudConfig =
                      syncConfigurationManager.retrieveDuracloudConfiguration();
                  config.setHost(duracloudConfig.getHost());
                  config.setPort(duracloudConfig.getPort());
                  config.setNumFiles(10);
                  config.setSizeFiles(5);
                  config.setSpaceId(duracloudConfig.getSpaceId());
                  config.setUsername(duracloudConfig.getUsername());
                  config.setPassword(duracloudConfig.getPassword());
                  config.setContext(SyncOptimizeConfigParser.DEFAULT_CONTEXT);
                  try {
                      int threadCount =
                          syncOptimizeDriver.getOptimalThreads(config);
                      syncConfigurationManager.setThreadCount(threadCount);
                      status =
                          MessageFormat.format("The optimizer last ran to completion at {0}. "
                                               +
                                               "The optimal thread count under the prevailing system conditions at that" +
                                               " time was {1}.  "
                                               + "  The system has been updated with the new thread count.",
                                               new Date(),
                                               threadCount);
  
                      running = false;
  
                      try {
                          callback.onSuccess();
                      } catch (Exception e) {
                          log.error(e.getMessage());
                      }
  
                  } catch (Exception e) {
                      log.error(e.getMessage(), e);
                      status =
                          "The optimizer failed: "
                          + e.getMessage()
                          + ". Please try again or contact DuraCloud support.";
                      failed = true;
                      running = false;
                      callback.onFailure(e, status);
                  }
              }
          }).start();
  
      }
docs: Starts the sync optimization process. On success, the thread count will be updated automatically.
  It is up to to caller to detect a successful run (using the callback interface) and responding
  with an autostart of the SyncProcessManager if appropriate.
  
  @param callback on success