question: 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 ( ) ; } } }
target:  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.