@Test public void ローテートされたADS書き込み失敗ログが物理削除モードで削除できること() throws AdsWriteFailureLogException { final String fileName = String.format("adsWriteFailure_%s.log.%d", PIO_VERSION_DUMMY, CREATED_TIME_DUMMY); File file = new File("./", fileName); RollingAdsWriteFailureLog rolling = new RollingAdsWriteFailureLog(file, null, PIO_VERSION_DUMMY, true); try { if (!file.createNewFile()) { fail("Failed to create temporary file. " + file.getAbsolutePath()); } rolling.deleteRotatedLog(); assertFalse(file.exists()); } catch (IOException e) { e.printStackTrace(); fail(e.getMessage()); } finally { if (null != file) { file.delete(); } } }
public synchronized void deleteRotatedLog() throws AdsWriteFailureLogException { closeRotatedFile(); super.deleteRotatedLog(rotatedAdsWriteFailureLog); }
RollingAdsWriteFailureLog extends AbstractAdsWriteFailureLog { public synchronized void deleteRotatedLog() throws AdsWriteFailureLogException { closeRotatedFile(); super.deleteRotatedLog(rotatedAdsWriteFailureLog); } }
RollingAdsWriteFailureLog extends AbstractAdsWriteFailureLog { public synchronized void deleteRotatedLog() throws AdsWriteFailureLogException { closeRotatedFile(); super.deleteRotatedLog(rotatedAdsWriteFailureLog); } private  RollingAdsWriteFailureLog();  RollingAdsWriteFailureLog(File rotatedAdsWriteFailureLog,
            String baseDir,
            String pcsVersion,
            boolean physicalDelete); }
RollingAdsWriteFailureLog extends AbstractAdsWriteFailureLog { public synchronized void deleteRotatedLog() throws AdsWriteFailureLogException { closeRotatedFile(); super.deleteRotatedLog(rotatedAdsWriteFailureLog); } private  RollingAdsWriteFailureLog();  RollingAdsWriteFailureLog(File rotatedAdsWriteFailureLog,
            String baseDir,
            String pcsVersion,
            boolean physicalDelete); static long getCreatedTimeFromFileName(String pcsVersion, File rotatedAdsWriteFailureLog); void openRotatedFile(); synchronized void closeRotatedFile(); List<String> readAdsFailureLog(int recordNum); synchronized void deleteRotatedLog(); }
RollingAdsWriteFailureLog extends AbstractAdsWriteFailureLog { public synchronized void deleteRotatedLog() throws AdsWriteFailureLogException { closeRotatedFile(); super.deleteRotatedLog(rotatedAdsWriteFailureLog); } private  RollingAdsWriteFailureLog();  RollingAdsWriteFailureLog(File rotatedAdsWriteFailureLog,
            String baseDir,
            String pcsVersion,
            boolean physicalDelete); static long getCreatedTimeFromFileName(String pcsVersion, File rotatedAdsWriteFailureLog); void openRotatedFile(); synchronized void closeRotatedFile(); List<String> readAdsFailureLog(int recordNum); synchronized void deleteRotatedLog();  }