clebertsuconic commented on code in PR #5498: URL: https://github.com/apache/activemq-artemis/pull/5498#discussion_r1960383349
########## artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java: ########## @@ -205,17 +206,23 @@ public PagingStoreImpl(final SimpleString address, this.syncNonTransactional = syncNonTransactional; - if (scheduledExecutor != null && syncTimeout > 0) { - this.syncTimer = new PageSyncTimer(this, scheduledExecutor, ioExecutor, syncTimeout); - } else { - this.syncTimer = null; - } + this.timedWriter = createPageTimedWriter(scheduledExecutor, syncTimeout); this.cursorProvider = storeFactory.newCursorProvider(this, this.storageManager, addressSettings, executor); this.usingGlobalMaxSize = pagingManager.isUsingGlobalSize(); } + protected PageTimedWriter createPageTimedWriter(ScheduledExecutorService scheduledExecutor, long syncTimeout) { + if (scheduledExecutor != null && syncTimeout > 0) { + PageTimedWriter localWriter = new PageTimedWriter(pageSize, storageManager, this, scheduledExecutor, executor, syncNonTransactional, syncTimeout); Review Comment: I created this method just so I could replace it on a UnitTest. I don't need a field created for anything else... I could create a field for these and access it through, but I prefer the way it is now. @gemmellr let me know if you are strong opinionated about this and I would be easy to make it a field. -- 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: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact