public boolean equals(Object o) { if (o instanceof CachedDestination) { CachedDestination other = (CachedDestination) o; return other.destination.equals(this.destination); } return false; }
@Override public boolean equals(Object other) { return other instanceof PreparedDestinationCompletion && destination.equals(((PreparedDestinationCompletion) other).destination) && messageSend == ((PreparedDestinationCompletion) other).messageSend; }
public boolean matches(ActiveMQDestination destination) { return this.destination.equals(destination); }
public static boolean isDestinationAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isDestinationAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.equals(TEMP_QUEUE_ADVISORY_TOPIC) || destination.equals(TEMP_TOPIC_ADVISORY_TOPIC) || destination.equals(QUEUE_ADVISORY_TOPIC) || destination.equals(TOPIC_ADVISORY_TOPIC); } }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } return obj instanceof AsyncJobKey && id.equals(((AsyncJobKey) obj).id) && destination.equals(((AsyncJobKey) obj).destination); }
public void removeTempDestination(ActiveMQDestination destination) { for (Iterator<DestinationInfo> iter = tempDestinations.iterator(); iter.hasNext();) { DestinationInfo di = iter.next(); if (di.getDestination().equals(destination)) { iter.remove(); } } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; FilteredDestination other = (FilteredDestination) obj; if (destination == null) { if (other.destination != null) return false; } else if (!destination.equals(other.destination)) return false; if (selector == null) { if (other.selector != null) return false; } else if (!selector.equals(other.selector)) return false; return true; } }
public boolean isInUse(ActiveMQTempDestination destination) { return info.getDestination().equals(destination); }
public static boolean isTempDestinationAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (!isTempDestinationAdvisoryTopic(compositeDestinations[i])) { return false; } } return true; } else { return destination.equals(TEMP_QUEUE_ADVISORY_TOPIC) || destination.equals(TEMP_TOPIC_ADVISORY_TOPIC); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; VirtualConsumerPair other = (VirtualConsumerPair) obj; if (!getOuterType().equals(other.getOuterType())) return false; if (activeMQDestination == null) { if (other.activeMQDestination != null) return false; } else if (!activeMQDestination.equals(other.activeMQDestination)) return false; if (virtualDestination == null) { if (other.virtualDestination != null) return false; } else if (!virtualDestination.equals(other.virtualDestination)) return false; return true; }
public void trackRecoveredAcks(ArrayList<MessageAck> preparedAcks) throws IOException { Map<ActiveMQDestination, KahaDBMessageStore> stores = new HashMap<>(); for (MessageAck ack : preparedAcks) { stores.put(ack.getDestination(), findMatchingStore(ack.getDestination())); } ArrayList<MessageAck> perStoreAcks = new ArrayList<>(); for (Entry<ActiveMQDestination, KahaDBMessageStore> entry : stores.entrySet()) { for (MessageAck ack : preparedAcks) { if (entry.getKey().equals(ack.getDestination())) { perStoreAcks.add(ack); } } entry.getValue().trackRecoveredAcks(perStoreAcks); perStoreAcks.clear(); } }
public void forgetRecoveredAcks(ArrayList<MessageAck> preparedAcks, boolean isRollback) throws IOException { if (preparedAcks != null) { Map<ActiveMQDestination, KahaDBMessageStore> stores = new HashMap<>(); for (MessageAck ack : preparedAcks) { stores.put(ack.getDestination(), findMatchingStore(ack.getDestination())); } ArrayList<MessageAck> perStoreAcks = new ArrayList<>(); for (Entry<ActiveMQDestination, KahaDBMessageStore> entry : stores.entrySet()) { for (MessageAck ack : preparedAcks) { if (entry.getKey().equals(ack.getDestination())) { perStoreAcks.add(ack); } } entry.getValue().forgetRecoveredAcks(perStoreAcks, isRollback); perStoreAcks.clear(); } } }
public static boolean isConnectionAdvisoryTopic(ActiveMQDestination destination) { if (destination.isComposite()) { ActiveMQDestination[] compositeDestinations = destination.getCompositeDestinations(); for (int i = 0; i < compositeDestinations.length; i++) { if (isConnectionAdvisoryTopic(compositeDestinations[i])) { return true; } } return false; } else { return destination.equals(CONNECTION_ADVISORY_TOPIC); } }
ActiveMQDestination dest, int maximumMessages) throws Exception { if (destination.equals(dest)) { return 0;
@SuppressWarnings("rawtypes") //Used to filter out any child/unmatching entries private boolean isMatchOrParent(final ActiveMQDestination destination, final DestinationMapEntry entry) { //If destination not set then do not filter out if (entry.getDestination() == null) { return true; } final DestinationFilter filter = DestinationFilter.parseFilter(entry.getDestination()); return destination.equals(entry.getDestination()) || filter.matches(destination); }
int maximumMessages) throws Exception { if (destination.equals(dest)) { return 0;
private boolean hasDurableSubChanged(ConsumerInfo info1, ConsumerInfo info2) throws IOException { if (info1.getSelector() != null ^ info2.getSelector() != null) { return true; } if (info1.getSelector() != null && !info1.getSelector().equals(info2.getSelector())) { return true; } //Not all persistence adapters store the noLocal value for a subscription PersistenceAdapter adapter = broker.getBrokerService().getPersistenceAdapter(); if (adapter instanceof NoLocalSubscriptionAware) { if (info1.isNoLocal() ^ info2.isNoLocal()) { return true; } } return !info1.getDestination().equals(info2.getDestination()); }
private boolean isDestinationDLQ(Message message) { DeadLetterStrategy deadLetterStrategy; Message tmp; Destination regionDestination = (Destination) message.getRegionDestination(); if (message != null && regionDestination != null) { deadLetterStrategy = regionDestination.getDeadLetterStrategy(); if (deadLetterStrategy != null && message.getOriginalDestination() != null) { // Cheap copy, since we only need two fields tmp = new ActiveMQMessage(); tmp.setDestination(message.getOriginalDestination()); tmp.setRegionDestination(regionDestination); // Determine if we are headed for a DLQ ActiveMQDestination deadLetterDestination = deadLetterStrategy.getDeadLetterQueueFor(tmp, null); if (deadLetterDestination.equals(message.getDestination())) { return true; } } } return false; } }
ActiveMQDestination deadLetterDestination = deadLetterStrategy.getDeadLetterQueueFor(message, subscription); if (deadLetterDestination.equals(message.getDestination())) { LOG.debug("Not re-adding to DLQ: {}, dest: {}", message.getMessageId(), message.getDestination()); return false;