Tabnine Logo
Destination.getActiveMQDestination
Code IndexAdd Tabnine to your IDE (free)

How to use
getActiveMQDestination
method
in
org.apache.activemq.broker.region.Destination

Best Java code snippets using org.apache.activemq.broker.region.Destination.getActiveMQDestination (Showing top 20 results out of 315)

origin: apache/activemq

@Override
public ActiveMQDestination getActiveMQDestination() {
  return next.getActiveMQDestination();
}
origin: apache/activemq

/**
 * @return true if the destination is a Dead Letter Queue
 */
public boolean isDLQ() {
  return destination.getActiveMQDestination().isDLQ();
}
origin: apache/activemq

@Override
public boolean isDLQ() {
  return destination.getActiveMQDestination().isDLQ();
}
origin: apache/activemq

@Override
public void setDLQ(boolean val) {
   destination.getActiveMQDestination().setDLQ(val);
}
origin: apache/activemq

  @Override
  public void run() {
    try {
      if (exceptionAtomicReference.get() == null) {
        dest.send(context, copy(message, dest.getActiveMQDestination()));
      }
    } catch (ResourceAllocationException e) {
      if (!dropMessageOnResourceLimit) {
        exceptionAtomicReference.set(e);
      }
    } catch (Exception e) {
      exceptionAtomicReference.set(e);
    } finally {
      concurrent.countDown();
    }
  }
});
origin: apache/activemq

public void remove(Destination destination) {
  if (brokerService == null) {
    throw new IllegalArgumentException("No brokerService injected!");
  }
  ActiveMQDestination topic = getMirrorTopic(destination.getActiveMQDestination());
  if (topic != null) {
    try {
      brokerService.removeDestination(topic);
    } catch (Exception e) {
      LOG.error("Failed to remove mirror destination for {}", destination, e);
    }
  }
  
}
origin: apache/activemq

protected Destination getMirrorDestination(Destination destination) throws Exception {
  if (brokerService == null) {
    throw new IllegalArgumentException("No brokerService injected!");
  }
  ActiveMQDestination topic = getMirrorTopic(destination.getActiveMQDestination());
  return brokerService.getDestination(topic);
}
origin: apache/activemq

@Override
public String getOptions() {
  Map<String, String> options = destination.getActiveMQDestination().getOptions();
  String optionsString = "";
  try {
    if (options != null) {
      optionsString = URISupport.createQueryString(options);
    }
  } catch (URISyntaxException ignored) {}
  return optionsString;
}
origin: apache/activemq

protected final synchronized void dispose(ConnectionContext context,
    Destination dest) throws Exception {
  // add to cache
  if (this.doCacheTempDestinations) {
    cachedDestinations.put(new CachedDestination(dest
        .getActiveMQDestination()), dest);
  }else {
    try {
      dest.dispose(context);
      dest.stop();
    } catch (Exception e) {
      LOG.warn("Failed to dispose of {}", dest, e);
    }
  }
}
origin: apache/activemq

@Override
public String toString() {
  return super.toString() + ":" + regionDestination.getActiveMQDestination().getPhysicalName() + ",batchResetNeeded=" + batchResetNeeded
        + ",size=" + this.size + ",cacheEnabled=" + cacheEnabled
        + ",maxBatchSize:" + maxBatchSize + ",hasSpace:" + hasSpace() + ",pendingCachedIds.size:" + pendingCachedIds.size()
        + ",lastSyncCachedId:" + lastCachedIds[SYNC_ADD] + ",lastSyncCachedId-seq:" + (lastCachedIds[SYNC_ADD] != null ? lastCachedIds[SYNC_ADD].getFutureOrSequenceLong() : "null")
        + ",lastAsyncCachedId:" + lastCachedIds[ASYNC_ADD] + ",lastAsyncCachedId-seq:" + (lastCachedIds[ASYNC_ADD] != null ? lastCachedIds[ASYNC_ADD].getFutureOrSequenceLong() : "null");
}
origin: apache/activemq

@Override
public Destination interceptMappedDestination(Destination destination) {
  // do a reverse map from destination to get actual virtual destination
  final String physicalName = destination.getActiveMQDestination().getPhysicalName();
  final Pattern pattern = Pattern.compile(getRegex(prefix) + "(.*)" + getRegex(postfix));
  final Matcher matcher = pattern.matcher(physicalName);
  if (matcher.matches()) {
    final String virtualName = matcher.group(1);
    return new MappedQueueFilter(new ActiveMQTopic(virtualName), destination);
  }
  return destination;
}
origin: apache/activemq

  public void send(ProducerBrokerExchange context, Message message) throws Exception {
    message.setDestination(mirrorDestination.getActiveMQDestination());
    mirrorDestination.send(context, message);
    if (isCopyMessage()) {
      message = message.copy();
    }
    message.setDestination(destination.getActiveMQDestination());
    message.setMemoryUsage(null); // set this to null so that it will use the queue memoryUsage instance instead of the topic.
    super.send(context, message);
  }
};
origin: apache/activemq

public synchronized void purge() throws Exception {
  final long originalMessageCount = destination.getDestinationStatistics().getMessages().getCount();
  ((Queue)destination).purge();
  LOG.info("{} purge of {} messages", destination.getActiveMQDestination().getQualifiedName(), originalMessageCount);
}
origin: apache/activemq

@Override
public Destination interceptMappedDestination(Destination destination) {
  if (!isForwardOnly() && destination.getActiveMQDestination().isQueue()) {
    // recover retroactive messages in mapped Queue
    return new MappedQueueFilter(getVirtualDestination(), destination);
  }
  return destination;
}
origin: apache/activemq

@Override
public synchronized void removeAll(){
  cache.clear();
  if (destination != null) {
    for (Subscription s : destination.getConsumers()) {
      s.getConsumerInfo().clearAssignedGroupCount(destination.getActiveMQDestination());
    }
  }
}
origin: apache/activemq

@Override
public void removeDestination(Destination dest) {
  ActiveMQDestination destination = dest.getActiveMQDestination();
  if (!destination.isTemporary()) {
    if (destination.isQueue()) {
      persistenceAdapter.removeQueueMessageStore((ActiveMQQueue) destination);
    }
    else if (!AdvisorySupport.isAdvisoryTopic(destination)) {
      persistenceAdapter.removeTopicMessageStore((ActiveMQTopic) destination);
    }
  }
}
origin: apache/activemq

@Override
public void isFull(ConnectionContext context, Destination destination, Usage<?> usage) {
  super.isFull(context, destination, usage);
  if (AdvisorySupport.isAdvisoryTopic(destination.getActiveMQDestination()) == false) {
    try {
      ActiveMQTopic topic = AdvisorySupport.getFullAdvisoryTopic(destination.getActiveMQDestination());
      ActiveMQMessage advisoryMessage = new ActiveMQMessage();
      advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_USAGE_NAME, usage.getName());
      advisoryMessage.setLongProperty(AdvisorySupport.MSG_PROPERTY_USAGE_COUNT, usage.getUsage());
      fireAdvisory(context, topic, null, null, advisoryMessage);
    } catch (Exception e) {
      handleFireFailure("is full", e);
    }
  }
}
origin: apache/activemq

  @Override
  public boolean removeEldestEntry(final Map.Entry eldest) {
    boolean remove = super.removeEldestEntry(eldest);
    if (remove) {
      if (destination != null) {
        for (Subscription s : destination.getConsumers()) {
         if (s.getConsumerInfo().getConsumerId().equals(eldest.getValue())) {
           s.getConsumerInfo().decrementAssignedGroupCount(destination.getActiveMQDestination());
           break;
          }
        }
      }
    }
    return remove;
  }
};
origin: apache/activemq

@Override
public void slowConsumer(ConnectionContext context, Destination destination, Subscription subs) {
  super.slowConsumer(context, destination, subs);
  try {
    if (!AdvisorySupport.isAdvisoryTopic(destination.getActiveMQDestination())) {
      ActiveMQTopic topic = AdvisorySupport.getSlowConsumerAdvisoryTopic(destination.getActiveMQDestination());
      ActiveMQMessage advisoryMessage = new ActiveMQMessage();
      advisoryMessage.setStringProperty(AdvisorySupport.MSG_PROPERTY_CONSUMER_ID, subs.getConsumerInfo().getConsumerId().toString());
      fireAdvisory(context, topic, subs.getConsumerInfo(), null, advisoryMessage);
    }
  } catch (Exception e) {
    handleFireFailure("slow consumer", e);
  }
}
origin: apache/activemq

@Override
public boolean addRecoveredMessage(ConnectionContext context, MessageReference message) throws Exception {
  boolean result = false;
  MessageEvaluationContext msgContext = context.getMessageEvaluationContext();
  try {
    Destination regionDestination = (Destination) message.getRegionDestination();
    msgContext.setDestination(regionDestination.getActiveMQDestination());
    msgContext.setMessageReference(message);
    result = matches(message, msgContext);
    if (result) {
      doAddRecoveredMessage(message);
    }
  } finally {
    msgContext.clear();
  }
  return result;
}
org.apache.activemq.broker.regionDestinationgetActiveMQDestination

Popular methods of Destination

  • getConsumers
  • getDestinationStatistics
  • getName
  • browse
  • removeSubscription
  • acknowledge
  • addProducer
  • addSubscription
  • dispose
  • fastProducer
    Called to notify a producer is too fast
  • gc
  • getBlockedProducerWarningInterval
  • gc,
  • getBlockedProducerWarningInterval,
  • getCursorMemoryHighWaterMark,
  • getDeadLetterStrategy,
  • getMaxAuditDepth,
  • getMaxBrowsePageSize,
  • getMaxPageSize,
  • getMaxProducersToAudit,
  • getMemoryUsage

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now