private void deleteFile() { final OplogFile olf = getOLF(); if (this.maxOplogSize != 0) { this.dirHolder.decrementTotalOplogSize(this.maxOplogSize); this.maxOplogSize = 0; olf.currSize = 0; } if (olf.f == null) return; if (!olf.f.exists()) return; if (!olf.f.delete() && olf.f.exists()) { throw new DiskAccessException(LocalizedStrings.Oplog_COULD_NOT_DELETE__0_.toLocalizedString(olf.f.getAbsolutePath()), this.parent); } logger.info(LocalizedMessage.create(LocalizedStrings.Oplog_DELETE_0_1_2, new Object[] {toString(), "crf", this.parent.getName()})); }
private void deleteFile(final OplogFile olf) { synchronized(this.lock) { if (olf.currSize != 0) { this.dirHolder.decrementTotalOplogSize(olf.currSize); olf.currSize = 0;
private void deleteFile() { final OplogFile olf = getOLF(); if (this.maxOplogSize != 0) { this.dirHolder.decrementTotalOplogSize(this.maxOplogSize); this.maxOplogSize = 0; olf.currSize = 0; } if (olf.f == null) return; if (!olf.f.exists()) return; if (!olf.f.delete() && olf.f.exists()) { throw new DiskAccessException(LocalizedStrings.Oplog_COULD_NOT_DELETE__0_.toLocalizedString(olf.f.getAbsolutePath()), this.parent); } if (logger.infoEnabled()) { logger.info(LocalizedStrings.Oplog_DELETE_0_1_2, new Object[] {toString(), "crf", this.parent.getName()}); // logger.info(LocalizedStrings.DEBUG, // "DEBUG deleteFile", new RuntimeException("STACK")); } }
private void deleteFile(final OplogFile olf) { synchronized (this.lock) { if (olf.currSize != 0) { this.dirHolder.decrementTotalOplogSize(olf.currSize); olf.currSize = 0;