If pageIn is forced - don't do lazyDispatch

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@636411 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2008-03-12 16:48:22 +00:00
parent 95fcceb00e
commit 84792bafed
1 changed files with 1 additions and 2 deletions

View File

@ -20,7 +20,6 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
@ -985,7 +984,7 @@ public class Queue extends BaseDestination implements Task {
try{
int toPageIn = getMaxPageSize() - pagedInMessages.size();
if (isLazyDispatch()) {
if (isLazyDispatch()&& !force) {
// Only page in the minimum number of messages which can be dispatched immediately.
toPageIn = Math.min(getConsumerMessageCountBeforeFull(), toPageIn);
}