org.apache.activemq.broker.region.Queue.pageInMessages()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(164)

本文整理了Java中org.apache.activemq.broker.region.Queue.pageInMessages方法的一些代码示例,展示了Queue.pageInMessages的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Queue.pageInMessages方法的具体详情如下:
包路径:org.apache.activemq.broker.region.Queue
类名称:Queue
方法名:pageInMessages

Queue.pageInMessages介绍

暂无

代码示例

代码示例来源: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: apache/activemq

pageInMessages(hasBrowsers && getMaxBrowsePageSize() > 0, getMaxPageSize());
} catch (Throwable e) {
  LOG.error("Failed to page in more queue messages ", 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-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-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);
  }
}

代码示例来源:origin: pierre/meteo

pageInMessages(pendingBrowserDispatch != null);

代码示例来源:origin: pierre/meteo

public void doBrowse(List<Message> browseList, int max) {
  final ConnectionContext connectionContext = createConnectionContext();
  try {
    pageInMessages(false);
    List<MessageReference> toExpire = new ArrayList<MessageReference>();

代码示例来源:origin: org.apache.activemq/activemq-all

pageInMessages(hasBrowsers && getMaxBrowsePageSize() > 0, getMaxPageSize());
} catch (Throwable e) {
  LOG.error("Failed to page in more queue messages ", e);

代码示例来源:origin: org.apache.activemq/activemq-broker

pageInMessages(hasBrowsers && getMaxBrowsePageSize() > 0, getMaxPageSize());
} catch (Throwable e) {
  LOG.error("Failed to page in more queue messages ", e);

代码示例来源:origin: org.apache.activemq/activemq-osgi

pageInMessages(hasBrowsers && getMaxBrowsePageSize() > 0, getMaxPageSize());
} catch (Throwable e) {
  LOG.error("Failed to page in more queue messages ", e);

相关文章

Queue类方法