clebertsuconic commented on a change in pull request #3580:
URL: https://github.com/apache/activemq-artemis/pull/3580#discussion_r632891984
##########
File path:
artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java
##########
@@ -2245,6 +2379,155 @@ private synchronized JournalLoadInformation load(final
LoaderCallback loadManage
}
}
+
+ @Override
+ public void processBackupCleanup() {
+ if (journalRetentionFolder != null && (journalRetentionMaxFiles > 0 ||
journalRetentionPeriod > 0)) {
+
+ FilenameFilter fnf = new FilenameFilter() {
+ @Override
+ public boolean accept(final File file, final String name) {
+ return name != null && name.endsWith("." +
filesRepository.getFileExtension());
+ }
+ };
+
+
+ if (journalRetentionPeriod > 0) {
+ String[] fileNames = journalRetentionFolder.list(fnf);
+ Arrays.sort(fileNames);
+
+ GregorianCalendar calendar = this.calendarThreadLocal.get();
+ calendar.setTimeInMillis(System.currentTimeMillis() -
journalRetentionUnit.toMillis(journalRetentionPeriod));
Review comment:
ok.. fair enough.. I can do that
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]