本文整理了Java中org.apache.activemq.broker.region.Queue.doBrowseList
方法的一些代码示例,展示了Queue.doBrowseList
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Queue.doBrowseList
方法的具体详情如下:
包路径:org.apache.activemq.broker.region.Queue
类名称:Queue
方法名:doBrowseList
暂无
代码示例来源:origin: apache/activemq
public void doBrowse(List<Message> browseList, int max) {
final ConnectionContext connectionContext = createConnectionContext();
try {
int maxPageInAttempts = 1;
if (max > 0) {
messagesLock.readLock().lock();
try {
maxPageInAttempts += (messages.size() / max);
} finally {
messagesLock.readLock().unlock();
}
while (shouldPageInMoreForBrowse(max) && maxPageInAttempts-- > 0) {
pageInMessages(!memoryUsage.isFull(110), max);
}
}
doBrowseList(browseList, max, dispatchPendingList, pagedInPendingDispatchLock, connectionContext, "redeliveredWaitingDispatch+pagedInPendingDispatch");
doBrowseList(browseList, max, pagedInMessages, pagedInMessagesLock, connectionContext, "pagedInMessages");
// we need a store iterator to walk messages on disk, independent of the cursor which is tracking
// the next message batch
} catch (BrokerStoppedException ignored) {
} catch (Exception e) {
LOG.error("Problem retrieving message for browse", e);
}
}
代码示例来源:origin: org.apache.activemq/activemq-broker
public void doBrowse(List<Message> browseList, int max) {
final ConnectionContext connectionContext = createConnectionContext();
try {
int maxPageInAttempts = 1;
if (max > 0) {
messagesLock.readLock().lock();
try {
maxPageInAttempts += (messages.size() / max);
} finally {
messagesLock.readLock().unlock();
}
while (shouldPageInMoreForBrowse(max) && maxPageInAttempts-- > 0) {
pageInMessages(!memoryUsage.isFull(110), max);
}
}
doBrowseList(browseList, max, dispatchPendingList, pagedInPendingDispatchLock, connectionContext, "redeliveredWaitingDispatch+pagedInPendingDispatch");
doBrowseList(browseList, max, pagedInMessages, pagedInMessagesLock, connectionContext, "pagedInMessages");
// we need a store iterator to walk messages on disk, independent of the cursor which is tracking
// the next message batch
} catch (BrokerStoppedException ignored) {
} catch (Exception e) {
LOG.error("Problem retrieving message for browse", e);
}
}
代码示例来源:origin: org.apache.activemq/activemq-all
public void doBrowse(List<Message> browseList, int max) {
final ConnectionContext connectionContext = createConnectionContext();
try {
int maxPageInAttempts = 1;
if (max > 0) {
messagesLock.readLock().lock();
try {
maxPageInAttempts += (messages.size() / max);
} finally {
messagesLock.readLock().unlock();
}
while (shouldPageInMoreForBrowse(max) && maxPageInAttempts-- > 0) {
pageInMessages(!memoryUsage.isFull(110), max);
}
}
doBrowseList(browseList, max, dispatchPendingList, pagedInPendingDispatchLock, connectionContext, "redeliveredWaitingDispatch+pagedInPendingDispatch");
doBrowseList(browseList, max, pagedInMessages, pagedInMessagesLock, connectionContext, "pagedInMessages");
// we need a store iterator to walk messages on disk, independent of the cursor which is tracking
// the next message batch
} catch (BrokerStoppedException ignored) {
} catch (Exception e) {
LOG.error("Problem retrieving message for browse", e);
}
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
public void doBrowse(List<Message> browseList, int max) {
final ConnectionContext connectionContext = createConnectionContext();
try {
int maxPageInAttempts = 1;
if (max > 0) {
messagesLock.readLock().lock();
try {
maxPageInAttempts += (messages.size() / max);
} finally {
messagesLock.readLock().unlock();
}
while (shouldPageInMoreForBrowse(max) && maxPageInAttempts-- > 0) {
pageInMessages(!memoryUsage.isFull(110), max);
}
}
doBrowseList(browseList, max, dispatchPendingList, pagedInPendingDispatchLock, connectionContext, "redeliveredWaitingDispatch+pagedInPendingDispatch");
doBrowseList(browseList, max, pagedInMessages, pagedInMessagesLock, connectionContext, "pagedInMessages");
// we need a store iterator to walk messages on disk, independent of the cursor which is tracking
// the next message batch
} catch (BrokerStoppedException ignored) {
} catch (Exception e) {
LOG.error("Problem retrieving message for browse", e);
}
}
内容来源于网络,如有侵权,请联系作者删除!