@Override public RoutingStatus route(final Message message, final boolean direct) throws Exception { return route(message, (Transaction) null, direct); }
@Override public void route(final Message message, final RoutingContext context) throws Exception { route(message, context, true); }
@Override public AddressInfo removeAddressInfo(SimpleString address) throws Exception { return removeAddressInfo(address, false); }
@Override public AddressInfo removeAddressInfo(SimpleString address) throws Exception { final AddressInfo removed = super.removeAddressInfo(address); if (removed != null) { //Remove from mappings so removeAndUpdateAddressMap processes and cleanup mappings.remove(address); removeAndUpdateAddressMap(new AddressImpl(removed.getName(), wildcardConfiguration)); } return removed; }
@Override public DuplicateIDCache getDuplicateIDCache(final SimpleString address) { DuplicateIDCache cache = duplicateIDCaches.get(address); if (cache == null) { cache = new DuplicateIDCacheImpl(address, idCacheSize, storageManager, persistIDCache); DuplicateIDCache oldCache = duplicateIDCaches.putIfAbsent(address, cache); if (oldCache != null) { cache = oldCache; } } return cache; }
@Override public void addToCache(final byte[] duplID) throws Exception { addToCache(duplID, null, false); }
@Override public boolean contains(final byte[] duplID) { boolean contains = cache.get(new ByteArrayHolder(duplID)) != null; if (contains) { logger.trace("DuplicateIDCacheImpl(" + this.address + ")::constains found a duplicate " + describeID(duplID, 0)); } return contains; }
@Override public synchronized void stop() throws Exception { started = false; managementService.removeNotificationListener(this); if (expiryReaperRunnable != null) expiryReaperRunnable.stop(); if (addressQueueReaperRunnable != null) addressQueueReaperRunnable.stop(); addressManager.clear(); queueInfos.clear(); }
@Override public boolean addAddressInfo(AddressInfo addressInfo) throws Exception { return internalAddressInfo(addressInfo, false); }
@Override public void routeWithAck(Message message, RoutingContext context) throws Exception { if (isMatchRoutingType(context)) { queue.routeWithAck(message, context); } }
@Override public void updated(QueueBinding binding) { updated(); }
@Override public String toString() { return "LocalQueueBinding [address=" + address + ", queue=" + queue + ", filter=" + getFilter() + ", name=" + name + ", clusterName=" + clusterName + "]"; }
@Override public void afterCommit(final Transaction tx) { process(); }
@Override public void clear() { super.clear(); addresses.clear(); wildCardAddresses.clear(); }
@Override public Bindings getBindingsForAddress(final SimpleString address) throws Exception { Bindings bindings = addressManager.getBindingsForRoutingAddress(address); if (bindings == null) { bindings = createBindings(address); } return bindings; }
@Override public DuplicateIDCache getDuplicateIDCache(final SimpleString address) { return new DuplicateIDCacheImpl(address, 2000, new NullStorageManager(), false); }
@Override public void addToCache(final byte[] duplID, final Transaction tx) throws Exception { addToCache(duplID, tx, false); }
@Override public RoutingStatus route(final Message message, final Transaction tx, final boolean direct, final boolean rejectDuplicates, final Binding binding) throws Exception { return route(message, new RoutingContextImpl(tx), direct, rejectDuplicates, binding); }
@Override public void reloadAddressInfo(AddressInfo addressInfo) throws Exception { internalAddressInfo(addressInfo, true); }
@Override public void route(final Message message, final RoutingContext context) throws Exception { if (isMatchRoutingType(context)) { queue.route(message, context); } }