log.info("Address " + pagingStore.getAddress() +
" is leaving page mode as all messages are consumed and acknowledged from the page store");
pagingStore.forceAnotherPage();
Page currentPage = pagingStore.getCurrentPage();
try
{
// First step: Move every cursor to the next bookmarked page (that was just created)
for (PageSubscription cursor : cursorList)
{
cursor.confirmPosition(new PagePositionImpl(currentPage.getPageId(), -1));
}
storageManager.waitOnOperations();
}
finally
{
for (PageSubscription cursor : cursorList)
{
cursor.enableAutoCleanup();
}
}
pagingStore.stopPaging();
// This has to be called after we stopped paging
for (PageSubscription cursor : cursorList)
{
cursor.scheduleCleanupCheck();
}
}
}
for (long i = pagingStore.getFirstPage(); i < minPage; i++)
{
Page page = pagingStore.depage();
if (page == null)
{
break;
}
depagedPages.add(page);