public void processExpired() { for (Message message: toExpire) { messageExpired(createConnectionContext(), createMessageReference(message)); // drop message will decrement so counter // balance here destinationStatistics.getMessages().increment(); } toExpire.clear(); }
int movedCounter = 0; Set<MessageReference> set = new LinkedHashSet<MessageReference>(); ConnectionContext context = createConnectionContext(); do { doPageIn(true);
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); } }
public void purge() throws Exception { ConnectionContext c = createConnectionContext(); List<MessageReference> list = null; try {
if (processExpired && ref.isExpired()) { if (broker.isExpired(ref)) { messageExpired(createConnectionContext(), ref); } else { ref.decrementReferenceCount(); ConnectionContext connectionContext = createConnectionContext(); dropMessage(ref); if (gotToTheStore(ref.getMessage())) {
public void processExpired() { for (Message message: toExpire) { messageExpired(createConnectionContext(), createMessageReference(message)); // drop message will decrement so counter // balance here destinationStatistics.getMessages().increment(); } toExpire.clear(); }
public void processExpired() { for (Message message: toExpire) { messageExpired(createConnectionContext(), createMessageReference(message)); // drop message will decrement so counter // balance here destinationStatistics.getMessages().increment(); } toExpire.clear(); }
public void processExpired() { for (Message message: toExpire) { messageExpired(createConnectionContext(), createMessageReference(message)); // drop message will decrement so counter // balance here destinationStatistics.getMessages().increment(); } toExpire.clear(); }
int movedCounter = 0; Set<MessageReference> set = new CopyOnWriteArraySet<MessageReference>(); ConnectionContext context = createConnectionContext(); do { doPageIn(true);
int movedCounter = 0; Set<MessageReference> set = new LinkedHashSet<MessageReference>(); ConnectionContext context = createConnectionContext(); do { doPageIn(true);
int movedCounter = 0; Set<MessageReference> set = new LinkedHashSet<MessageReference>(); ConnectionContext context = createConnectionContext(); do { doPageIn(true);
int movedCounter = 0; Set<MessageReference> set = new LinkedHashSet<MessageReference>(); ConnectionContext context = createConnectionContext(); do { doPageIn(true);
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); } }
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); } }
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); } }
public void purge() throws Exception { ConnectionContext c = createConnectionContext(); List<MessageReference> list = null; do { doPageIn(true); pagedInMessagesLock.readLock().lock(); try { list = new ArrayList<MessageReference>(pagedInMessages.values()); }finally { pagedInMessagesLock.readLock().unlock(); } for (MessageReference ref : list) { try { QueueMessageReference r = (QueueMessageReference) ref; removeMessage(c, r); } catch (IOException e) { } } // don't spin/hang if stats are out and there is nothing left in the // store } while (!list.isEmpty() && this.destinationStatistics.getMessages().getCount() > 0); if (this.destinationStatistics.getMessages().getCount() > 0) { LOG.warn(getActiveMQDestination().getQualifiedName() + " after purge complete, message count stats report: " + this.destinationStatistics.getMessages().getCount()); } gc(); this.destinationStatistics.getMessages().setCount(0); getMessages().clear(); }
messageExpired(createConnectionContext(), createMessageReference(message));
public void purge() throws Exception { ConnectionContext c = createConnectionContext(); List<MessageReference> list = null; try {
public void purge() throws Exception { ConnectionContext c = createConnectionContext(); List<MessageReference> list = null; try {
public void purge() throws Exception { ConnectionContext c = createConnectionContext(); List<MessageReference> list = null; try {