[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Paging code review (Repost)

clebert.suconic@jboss.com do-not-reply at jboss.com
Wed Dec 3 13:15:25 EST 2008


5) The tricky part on paging is to let depage happen at the same time messages are being paged.

Depage will aways return old pages, but when depageRate>pageRate, we will eventually be depaging the currentPage, on which case I open a newPage and return the current one.

But if no messages were produced on that new page, it will be empty. When we return that empty page, we will exit the pageMode and from that point we will start using the journal again.

This is done this way because I can't lock page while depaging records. It all happens concurrently. Once an address enters in pageMode, it will be in pageMode until the rate of removing messages on page is higher the rate on adding messages from page.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194097#4194097

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194097



More information about the jboss-dev-forums mailing list