clebertsuconic commented on code in PR #4349:
URL: https://github.com/apache/activemq-artemis/pull/4349#discussion_r1090927064
##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCursorProviderImpl.java:
##########
@@ -179,11 +182,13 @@ public void close(PageSubscription cursor) {
}
@Override
- public void scheduleCleanup() {
+ public Future<Boolean> scheduleCleanup() {
+ final SimpleFutureImpl<Boolean> future = new SimpleFutureImpl<>();
if (!cleanupEnabled || scheduledCleanup.intValue() > 2) {
// Scheduled cleanup was already scheduled before.. never mind!
// or we have cleanup disabled
- return;
+ pagingStore.execute(() -> future.set(true));
Review Comment:
Yes... I wanted to make sure any previous call to cleanup was finished. Say
you called scheduleCleanup a couple of times.. then you call scheduleCleanup
again...
I don't need to schedule another one as I already have a call scheduled,
but I want to return a Future that will be released after these calls have
finished.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]