private void assertCantDelete(final int... fileNumber) { for (int num : fileNumber) { Assert.assertFalse(files[num].isCanReclaim()); } }
private void assertCanDelete(final int... fileNumber) { for (int num : fileNumber) { Assert.assertTrue(files[num].isCanReclaim()); } }
if (file.isCanReclaim()) {
if (file.isCanReclaim()) {
@Override public String debug() throws Exception { reclaimer.scan(getDataFiles()); StringBuilder builder = new StringBuilder(); for (JournalFile file : filesRepository.getDataFiles()) { builder.append("DataFile:" + file + " posCounter = " + file.getPosCount() + " reclaimStatus = " + file.isCanReclaim() + " live size = " + file.getLiveSize() + "\n"); if (file instanceof JournalFileImpl) { builder.append(((JournalFileImpl) file).debug()); } } for (JournalFile file : filesRepository.getFreeFiles()) { builder.append("FreeFile:" + file + "\n"); } if (currentFile != null) { builder.append("CurrentFile:" + currentFile + " posCounter = " + currentFile.getPosCount() + "\n"); if (currentFile instanceof JournalFileImpl) { builder.append(((JournalFileImpl) currentFile).debug()); } } else { builder.append("CurrentFile: No current file at this point!"); } return builder.toString(); }
@Override public String debug() throws Exception { reclaimer.scan(getDataFiles()); StringBuilder builder = new StringBuilder(); for (JournalFile file : filesRepository.getDataFiles()) { builder.append("DataFile:" + file + " posCounter = " + file.getPosCount() + " reclaimStatus = " + file.isCanReclaim() + " live size = " + file.getLiveSize() + "\n"); if (file instanceof JournalFileImpl) { builder.append(((JournalFileImpl) file).debug()); } } for (JournalFile file : filesRepository.getFreeFiles()) { builder.append("FreeFile:" + file + "\n"); } if (currentFile != null) { builder.append("CurrentFile:" + currentFile + " posCounter = " + currentFile.getPosCount() + "\n"); if (currentFile instanceof JournalFileImpl) { builder.append(((JournalFileImpl) currentFile).debug()); } } else { builder.append("CurrentFile: No current file at this point!"); } return builder.toString(); }
if (!file.isCanReclaim() && currentFile.getNegCount(file) != 0) { logger.tracef("%s can't be reclaimed because %s has negative values", currentFile, file); outstandingNeg = true;
if (!file.isCanReclaim() && currentFile.getNegCount(file) != 0) { logger.tracef("%s can't be reclaimed because %s has negative values", currentFile, file); outstandingNeg = true;