本文整理了Java中org.apache.activemq.broker.region.Queue.createConnectionContext
方法的一些代码示例,展示了Queue.createConnectionContext
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Queue.createConnectionContext
方法的具体详情如下:
包路径:org.apache.activemq.broker.region.Queue
类名称:Queue
方法名:createConnectionContext
暂无
代码示例来源:origin: apache/activemq
public void processExpired() {
for (Message message: toExpire) {
messageExpired(createConnectionContext(), createMessageReference(message));
// drop message will decrement so counter
// balance here
destinationStatistics.getMessages().increment();
}
toExpire.clear();
}
代码示例来源:origin: apache/activemq
int movedCounter = 0;
Set<MessageReference> set = new LinkedHashSet<MessageReference>();
ConnectionContext context = createConnectionContext();
do {
doPageIn(true);
代码示例来源: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
public void purge() throws Exception {
ConnectionContext c = createConnectionContext();
List<MessageReference> list = null;
try {
代码示例来源:origin: apache/activemq
if (processExpired && ref.isExpired()) {
if (broker.isExpired(ref)) {
messageExpired(createConnectionContext(), ref);
} else {
ref.decrementReferenceCount();
ConnectionContext connectionContext = createConnectionContext();
dropMessage(ref);
if (gotToTheStore(ref.getMessage())) {
代码示例来源:origin: org.apache.activemq/activemq-broker
public void processExpired() {
for (Message message: toExpire) {
messageExpired(createConnectionContext(), createMessageReference(message));
// drop message will decrement so counter
// balance here
destinationStatistics.getMessages().increment();
}
toExpire.clear();
}
代码示例来源:origin: org.apache.activemq/activemq-all
public void processExpired() {
for (Message message: toExpire) {
messageExpired(createConnectionContext(), createMessageReference(message));
// drop message will decrement so counter
// balance here
destinationStatistics.getMessages().increment();
}
toExpire.clear();
}
代码示例来源:origin: org.apache.activemq/activemq-osgi
public void processExpired() {
for (Message message: toExpire) {
messageExpired(createConnectionContext(), createMessageReference(message));
// drop message will decrement so counter
// balance here
destinationStatistics.getMessages().increment();
}
toExpire.clear();
}
代码示例来源:origin: pierre/meteo
int movedCounter = 0;
Set<MessageReference> set = new CopyOnWriteArraySet<MessageReference>();
ConnectionContext context = createConnectionContext();
do {
doPageIn(true);
代码示例来源:origin: org.apache.activemq/activemq-broker
int movedCounter = 0;
Set<MessageReference> set = new LinkedHashSet<MessageReference>();
ConnectionContext context = createConnectionContext();
do {
doPageIn(true);
代码示例来源:origin: org.apache.activemq/activemq-all
int movedCounter = 0;
Set<MessageReference> set = new LinkedHashSet<MessageReference>();
ConnectionContext context = createConnectionContext();
do {
doPageIn(true);
代码示例来源:origin: org.apache.activemq/activemq-osgi
int movedCounter = 0;
Set<MessageReference> set = new LinkedHashSet<MessageReference>();
ConnectionContext context = createConnectionContext();
do {
doPageIn(true);
代码示例来源: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);
}
}
代码示例来源:origin: pierre/meteo
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();
}
代码示例来源:origin: pierre/meteo
messageExpired(createConnectionContext(), createMessageReference(message));
代码示例来源:origin: org.apache.activemq/activemq-broker
public void purge() throws Exception {
ConnectionContext c = createConnectionContext();
List<MessageReference> list = null;
try {
代码示例来源:origin: org.apache.activemq/activemq-all
public void purge() throws Exception {
ConnectionContext c = createConnectionContext();
List<MessageReference> list = null;
try {
代码示例来源:origin: org.apache.activemq/activemq-osgi
public void purge() throws Exception {
ConnectionContext c = createConnectionContext();
List<MessageReference> list = null;
try {
内容来源于网络,如有侵权,请联系作者删除!