public static void deleteLocatorStateFile(final int... ports){
  for (int index=0; index < ports.length; index++) {
    File stateFile=new File("locator" + ports[index] + "view.dat");
    if (stateFile.exists()) {
      stateFile.delete();
    }
  }
}

public static void deleteLocatorStateFile ( final int ... ports ) { for ( int index = 0 ; index < ports . length ; index ++ ) { File stateFile = new File ( "locator" + ports [ index ] + "view.dat" ) ; if ( stateFile . exists ( ) ) { stateFile . delete ( ) ; } } }
delete locator state files . use this after getting a random port to ensure that an old locator state file isn ' t picked up by the new locator you ' re starting .
