/** * Reset effectively clears the disk cache, creating new files, recyclebins, and keymaps. * <p> * It can be used to handle errors by last resort, force content update, or removeall. */ private void reset() { if ( log.isWarnEnabled() ) { log.warn( logCacheName + "Resetting cache" ); } try { storageLock.writeLock().lock(); this.keyStore.reset(); if ( dataFile != null ) { dataFile.reset(); } } catch ( IOException e ) { log.error( logCacheName + "Failure resetting state", e ); } finally { storageLock.writeLock().unlock(); } }
/** * Reset effectively clears the disk cache, creating new files, recyclebins, and keymaps. * <p> * It can be used to handle errors by last resort, force content update, or removeall. */ private void reset() { if ( log.isWarnEnabled() ) { log.warn( logCacheName + "Resetting cache" ); } try { storageLock.writeLock().lock(); this.keyStore.reset(); if ( dataFile != null ) { dataFile.reset(); } } catch ( IOException e ) { log.error( logCacheName + "Failure resetting state", e ); } finally { storageLock.writeLock().unlock(); } }