@Override
  public synchronized void stop() {
    if (started) {
      try {
        lock.release();
        // Closing RandomAccessFile so that files gets deleted on windows and
        // org.ehcache.internal.persistence.DefaultLocalPersistenceServiceTest.testLocksDirectoryAndUnlocks()
        // passes on windows
        rw.close();
        if (!lockFile.delete()) {
          LOGGER.debug("Lock file was not deleted {}.", lockFile.getPath());
        }
      } catch (IOException e) {
        throw new RuntimeException("Couldn't unlock rootDir: " + rootDirectory.getAbsolutePath(), e);
      }
      started = false;
      LOGGER.debug("RootDirectory Unlocked");
    }
  }
@ Override public synchronized void stop ( ) { if ( started ) { try { lock . release ( ) ; rw . close ( ) ; if ( ! lockFile . delete ( ) ) { LOGGER . debug ( "Lock file was not deleted {}." , lockFile . getPath ( ) ) ; } } catch ( IOException e ) { throw new RuntimeException ( "Couldn't unlock rootDir: " + rootDirectory . getAbsolutePath ( ) , e ) ; } started = false ; LOGGER . debug ( "RootDirectory Unlocked" ) ; } }
{@inheritDoc}