public ConsumerInfo copy() { ConsumerInfo info = new ConsumerInfo(); copy(info); return info; }
DemandSubscription(ConsumerInfo info) { remoteInfo = info; localInfo = info.copy(); localInfo.setNetworkSubscription(true); remoteSubsIds.add(info.getConsumerId()); }
@Override public void setSelector(String selector) throws InvalidSelectorException { ConsumerInfo copy = info.copy(); copy.setSelector(selector); BooleanExpression newSelector = parseSelector(copy); // its valid so lets actually update it now info.setSelector(selector); this.selectorExpression = newSelector; }
DurableTopicSubscription sub = topicRegion.getDurableSubscriptions().get(key); if (sub != null && NetworkBridgeUtils.matchesNetworkConfig(config, sub.getConsumerInfo().getDestination())) { ConsumerInfo ci = sub.getConsumerInfo().copy(); ci.setClientId(key.getClientId()); subscriptionInfos.add(ci); if (sub != null && NetworkBridgeUtils.isForcedDurable(sub.getConsumerInfo(), config.getDynamicallyIncludedDestinations())) { subscriptionInfos.add(sub.getConsumerInfo().copy()); for (ConsumerInfo info : ab.getVirtualDestinationConsumers().keySet()) { if (NetworkBridgeUtils.isForcedDurable(info, config.getDynamicallyIncludedDestinations())) { subscriptionInfos.add(info.copy());
/** * @param transport * @param sessionState * @throws IOException */ protected void restoreConsumers(Transport transport, SessionState sessionState) throws IOException { // Restore the session's consumers but possibly in pull only (prefetch 0 state) till recovery complete final ConnectionState connectionState = connectionStates.get(sessionState.getInfo().getSessionId().getParentId()); final boolean connectionInterruptionProcessingComplete = connectionState.isConnectionInterruptProcessingComplete(); for (ConsumerState consumerState : sessionState.getConsumerStates()) { ConsumerInfo infoToSend = consumerState.getInfo(); if (!connectionInterruptionProcessingComplete && infoToSend.getPrefetchSize() > 0) { infoToSend = consumerState.getInfo().copy(); connectionState.getRecoveringPullConsumers().put(infoToSend.getConsumerId(), consumerState.getInfo()); infoToSend.setPrefetchSize(0); if (LOG.isDebugEnabled()) { LOG.debug("restore consumer: " + infoToSend.getConsumerId() + " in pull mode pending recovery, overriding prefetch: " + consumerState.getInfo().getPrefetchSize()); } } if (LOG.isDebugEnabled()) { LOG.debug("consumer: " + infoToSend.getConsumerId()); } transport.oneway(infoToSend); } }
info = info.copy(); setConsumerInfoVirtualDest(info, virtualDestination, activeMQDest); ActiveMQTopic topic = AdvisorySupport.getVirtualDestinationConsumerAdvisoryTopic(info.getDestination());
protected void addConsumerInfo(final ConsumerInfo consumerInfo) throws IOException { ConsumerInfo info = consumerInfo.copy(); addRemoteBrokerToBrokerPath(info); DemandSubscription sub = createDemandSubscription(info); if (sub != null) { if (duplicateSuppressionIsRequired(sub)) { undoMapRegistration(sub); } else { if (consumerInfo.isDurable()) { //Handle the demand generated by proxy network subscriptions //The broker path is case is normal if (isProxyNSConsumerBrokerPath(sub.getRemoteInfo()) && info.getSubscriptionName() != null && info.getSubscriptionName().startsWith(DURABLE_SUB_PREFIX)) { final BrokerId[] path = info.getBrokerPath(); addProxyNetworkSubscriptionBrokerPath(sub, path, consumerInfo.getSubscriptionName()); //This is the durable sync case on broker restart } else if (isProxyNSConsumerClientId(sub.getRemoteInfo().getClientId()) && isProxyBridgeSubscription(info.getClientId(), info.getSubscriptionName())) { addProxyNetworkSubscriptionClientId(sub, sub.getRemoteInfo().getClientId(), consumerInfo.getSubscriptionName()); } else { sub.getDurableRemoteSubs().add(new SubscriptionInfo(sub.getRemoteInfo().getClientId(), consumerInfo.getSubscriptionName())); } } addSubscription(sub); LOG.debug("{} new demand subscription: {}", configuration.getBrokerName(), sub); } } }
public ConsumerInfo copy() { ConsumerInfo info = new ConsumerInfo(); copy(info); return info; }
public ConsumerInfo copy() { ConsumerInfo info = new ConsumerInfo(); copy(info); return info; }
public ConsumerInfo copy() { ConsumerInfo info = new ConsumerInfo(); copy(info); return info; }
public ConsumerInfo copy() { ConsumerInfo info = new ConsumerInfo(); copy(info); return info; }
DemandSubscription(ConsumerInfo info) { remoteInfo = info; localInfo = info.copy(); localInfo.setNetworkSubscription(true); remoteSubsIds.add(info.getConsumerId()); }
DemandSubscription(ConsumerInfo info) { remoteInfo = info; localInfo = info.copy(); localInfo.setNetworkSubscription(true); remoteSubsIds.add(info.getConsumerId()); }
DemandSubscription(ConsumerInfo info) { remoteInfo = info; localInfo = info.copy(); localInfo.setNetworkSubscription(true); remoteSubsIds.add(info.getConsumerId()); }
DemandSubscription(ConsumerInfo info) { remoteInfo = info; localInfo = info.copy(); localInfo.setNetworkSubscription(true); remoteSubsIds.add(info.getConsumerId()); }
@Override public void setSelector(String selector) throws InvalidSelectorException { ConsumerInfo copy = info.copy(); copy.setSelector(selector); BooleanExpression newSelector = parseSelector(copy); // its valid so lets actually update it now info.setSelector(selector); this.selectorExpression = newSelector; }
@Override public void setSelector(String selector) throws InvalidSelectorException { ConsumerInfo copy = info.copy(); copy.setSelector(selector); BooleanExpression newSelector = parseSelector(copy); // its valid so lets actually update it now info.setSelector(selector); this.selectorExpression = newSelector; }
@Override public void setSelector(String selector) throws InvalidSelectorException { ConsumerInfo copy = info.copy(); copy.setSelector(selector); BooleanExpression newSelector = parseSelector(copy); // its valid so lets actually update it now info.setSelector(selector); this.selectorExpression = newSelector; }
public void setSelector(String selector) throws InvalidSelectorException { ConsumerInfo copy = info.copy(); copy.setSelector(selector); BooleanExpression newSelector = parseSelector(copy); // its valid so lets actually update it now info.setSelector(selector); this.selectorExpression = newSelector; }
protected boolean addConsumerInfo(final ConsumerInfo consumerInfo) throws IOException { boolean consumerAdded = false; ConsumerInfo info = consumerInfo.copy(); addRemoteBrokerToBrokerPath(info); DemandSubscription sub = createDemandSubscription(info); if (sub != null) { if (duplicateSuppressionIsRequired(sub)) { undoMapRegistration(sub); } else { addSubscription(sub); consumerAdded = true; } } return consumerAdded; }