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

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

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

origin: apache/activemq

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

@Override
public long getStoreMessageSize() {
  MessageStore messageStore = destination.getMessageStore();
  return messageStore != null ? messageStore.getMessageStoreStatistics().getMessageSize().getTotalSize() : 0;
}
origin: apache/activemq

Set<Subscription> dupChecker = new HashSet<Subscription>(rc);
TopicMessageStore store = (TopicMessageStore)dest.getMessageStore();
origin: apache/activemq

@Override
public void add(ConnectionContext context, Destination destination) throws Exception {
  if (!destinations.contains(destination)) {
    super.add(context, destination);
  }
  // do it just once per destination
  if (durableDestinations.containsKey(destination.getActiveMQDestination())) {
    return;
  }
  durableDestinations.put(destination.getActiveMQDestination(), destination);
  if (active.get() || keepDurableSubsActive) {
    Topic topic = (Topic) destination;
    topic.activate(context, this);
    getSubscriptionStatistics().getEnqueues().add(pending.size());
  } else if (destination.getMessageStore() != null) {
    TopicMessageStore store = (TopicMessageStore) destination.getMessageStore();
    try {
      getSubscriptionStatistics().getEnqueues().add(store.getMessageCount(subscriptionKey.getClientId(), subscriptionKey.getSubscriptionName()));
    } catch (IOException e) {
      JMSException jmsEx = new JMSException("Failed to retrieve enqueueCount from store " + e);
      jmsEx.setLinkedException(e);
      throw jmsEx;
    }
  }
  dispatchPending();
}
origin: apache/activemq

public void remove(SubscriptionView view, String messageId)  throws Exception {
  ActiveMQDestination destination = getTopicDestination(view);
  if (destination != null) {
    final Destination topic = getTopicRegion().getDestinationMap().get(destination);
    final MessageAck messageAck = new MessageAck();
    messageAck.setMessageID(new MessageId(messageId));
    messageAck.setDestination(destination);
    topic.getMessageStore().removeMessage(brokerService.getAdminConnectionContext(), messageAck);
    // if sub is active, remove from cursor
    if (view.subscription instanceof DurableTopicSubscription) {
      final DurableTopicSubscription durableTopicSubscription = (DurableTopicSubscription) view.subscription;
      final MessageReference messageReference = new NullMessageReference();
      messageReference.getMessage().setMessageId(messageAck.getFirstMessageId());
      durableTopicSubscription.getPending().remove(messageReference);
    }
  } else {
    throw new IllegalStateException("can't determine topic for sub:" + view);
  }
}
origin: org.apache.activemq/activemq-broker

@Override
public MessageStore getMessageStore() {
  return next.getMessageStore();
}
origin: org.apache.activemq/activemq-osgi

@Override
public MessageStore getMessageStore() {
  return next.getMessageStore();
}
origin: org.apache.activemq/activemq-all

@Override
public MessageStore getMessageStore() {
  return next.getMessageStore();
}
origin: pierre/meteo

public MessageStore getMessageStore() {
  return next.getMessageStore();
}
origin: org.apache.activemq/activemq-broker

@Override
public long getStoreMessageSize() {
  MessageStore messageStore = destination.getMessageStore();
  return messageStore != null ? messageStore.getMessageStoreStatistics().getMessageSize().getTotalSize() : 0;
}
origin: org.apache.activemq/activemq-all

@Override
public long getStoreMessageSize() {
  MessageStore messageStore = destination.getMessageStore();
  return messageStore != null ? messageStore.getMessageStoreStatistics().getMessageSize().getTotalSize() : 0;
}
origin: org.apache.activemq/activemq-osgi

@Override
public long getStoreMessageSize() {
  MessageStore messageStore = destination.getMessageStore();
  return messageStore != null ? messageStore.getMessageStoreStatistics().getMessageSize().getTotalSize() : 0;
}
origin: org.apache.activemq/activemq-all

Set<Subscription> dupChecker = new HashSet<Subscription>(rc);
TopicMessageStore store = (TopicMessageStore)dest.getMessageStore();
origin: pierre/meteo

public void add(ConnectionContext context, Destination destination) throws Exception {
  super.add(context, destination);
  // do it just once per destination
  if (destinations.containsKey(destination.getActiveMQDestination())) {
    return;
  }
  destinations.put(destination.getActiveMQDestination(), destination);
  if (active.get() || keepDurableSubsActive) {
    Topic topic = (Topic)destination;
    topic.activate(context, this);
    if (pending.isEmpty(topic)) {
      topic.recoverRetroactiveMessages(context, this);
    }
    this.enqueueCounter+=pending.size();
  } else if (destination.getMessageStore() != null) {
    TopicMessageStore store = (TopicMessageStore)destination.getMessageStore();
    try {
      this.enqueueCounter+=store.getMessageCount(subscriptionKey.getClientId(),subscriptionKey.getSubscriptionName());
    } catch (IOException e) {
      JMSException jmsEx = new JMSException("Failed to retrieve eunqueueCount from store "+ e);
      jmsEx.setLinkedException(e);
      throw jmsEx;
    }
  }
  dispatchPending();
}
origin: org.apache.activemq/activemq-osgi

@Override
public void add(ConnectionContext context, Destination destination) throws Exception {
  if (!destinations.contains(destination)) {
    super.add(context, destination);
  }
  // do it just once per destination
  if (durableDestinations.containsKey(destination.getActiveMQDestination())) {
    return;
  }
  durableDestinations.put(destination.getActiveMQDestination(), destination);
  if (active.get() || keepDurableSubsActive) {
    Topic topic = (Topic) destination;
    topic.activate(context, this);
    getSubscriptionStatistics().getEnqueues().add(pending.size());
  } else if (destination.getMessageStore() != null) {
    TopicMessageStore store = (TopicMessageStore) destination.getMessageStore();
    try {
      getSubscriptionStatistics().getEnqueues().add(store.getMessageCount(subscriptionKey.getClientId(), subscriptionKey.getSubscriptionName()));
    } catch (IOException e) {
      JMSException jmsEx = new JMSException("Failed to retrieve enqueueCount from store " + e);
      jmsEx.setLinkedException(e);
      throw jmsEx;
    }
  }
  dispatchPending();
}
origin: org.apache.activemq/activemq-broker

@Override
public void add(ConnectionContext context, Destination destination) throws Exception {
  if (!destinations.contains(destination)) {
    super.add(context, destination);
  }
  // do it just once per destination
  if (durableDestinations.containsKey(destination.getActiveMQDestination())) {
    return;
  }
  durableDestinations.put(destination.getActiveMQDestination(), destination);
  if (active.get() || keepDurableSubsActive) {
    Topic topic = (Topic) destination;
    topic.activate(context, this);
    getSubscriptionStatistics().getEnqueues().add(pending.size());
  } else if (destination.getMessageStore() != null) {
    TopicMessageStore store = (TopicMessageStore) destination.getMessageStore();
    try {
      getSubscriptionStatistics().getEnqueues().add(store.getMessageCount(subscriptionKey.getClientId(), subscriptionKey.getSubscriptionName()));
    } catch (IOException e) {
      JMSException jmsEx = new JMSException("Failed to retrieve enqueueCount from store " + e);
      jmsEx.setLinkedException(e);
      throw jmsEx;
    }
  }
  dispatchPending();
}
origin: org.apache.activemq/activemq-all

@Override
public void add(ConnectionContext context, Destination destination) throws Exception {
  if (!destinations.contains(destination)) {
    super.add(context, destination);
  }
  // do it just once per destination
  if (durableDestinations.containsKey(destination.getActiveMQDestination())) {
    return;
  }
  durableDestinations.put(destination.getActiveMQDestination(), destination);
  if (active.get() || keepDurableSubsActive) {
    Topic topic = (Topic) destination;
    topic.activate(context, this);
    getSubscriptionStatistics().getEnqueues().add(pending.size());
  } else if (destination.getMessageStore() != null) {
    TopicMessageStore store = (TopicMessageStore) destination.getMessageStore();
    try {
      getSubscriptionStatistics().getEnqueues().add(store.getMessageCount(subscriptionKey.getClientId(), subscriptionKey.getSubscriptionName()));
    } catch (IOException e) {
      JMSException jmsEx = new JMSException("Failed to retrieve enqueueCount from store " + e);
      jmsEx.setLinkedException(e);
      throw jmsEx;
    }
  }
  dispatchPending();
}
origin: org.apache.activemq/activemq-osgi

public void remove(SubscriptionView view, String messageId)  throws Exception {
  ActiveMQDestination destination = getTopicDestination(view);
  if (destination != null) {
    final Destination topic = getTopicRegion().getDestinationMap().get(destination);
    final MessageAck messageAck = new MessageAck();
    messageAck.setMessageID(new MessageId(messageId));
    messageAck.setDestination(destination);
    topic.getMessageStore().removeMessage(brokerService.getAdminConnectionContext(), messageAck);
    // if sub is active, remove from cursor
    if (view.subscription instanceof DurableTopicSubscription) {
      final DurableTopicSubscription durableTopicSubscription = (DurableTopicSubscription) view.subscription;
      final MessageReference messageReference = new NullMessageReference();
      messageReference.getMessage().setMessageId(messageAck.getFirstMessageId());
      durableTopicSubscription.getPending().remove(messageReference);
    }
  } else {
    throw new IllegalStateException("can't determine topic for sub:" + view);
  }
}
origin: org.apache.activemq/activemq-broker

public void remove(SubscriptionView view, String messageId)  throws Exception {
  ActiveMQDestination destination = getTopicDestination(view);
  if (destination != null) {
    final Destination topic = getTopicRegion().getDestinationMap().get(destination);
    final MessageAck messageAck = new MessageAck();
    messageAck.setMessageID(new MessageId(messageId));
    messageAck.setDestination(destination);
    topic.getMessageStore().removeMessage(brokerService.getAdminConnectionContext(), messageAck);
    // if sub is active, remove from cursor
    if (view.subscription instanceof DurableTopicSubscription) {
      final DurableTopicSubscription durableTopicSubscription = (DurableTopicSubscription) view.subscription;
      final MessageReference messageReference = new NullMessageReference();
      messageReference.getMessage().setMessageId(messageAck.getFirstMessageId());
      durableTopicSubscription.getPending().remove(messageReference);
    }
  } else {
    throw new IllegalStateException("can't determine topic for sub:" + view);
  }
}
origin: org.apache.activemq/activemq-all

public void remove(SubscriptionView view, String messageId)  throws Exception {
  ActiveMQDestination destination = getTopicDestination(view);
  if (destination != null) {
    final Destination topic = getTopicRegion().getDestinationMap().get(destination);
    final MessageAck messageAck = new MessageAck();
    messageAck.setMessageID(new MessageId(messageId));
    messageAck.setDestination(destination);
    topic.getMessageStore().removeMessage(brokerService.getAdminConnectionContext(), messageAck);
    // if sub is active, remove from cursor
    if (view.subscription instanceof DurableTopicSubscription) {
      final DurableTopicSubscription durableTopicSubscription = (DurableTopicSubscription) view.subscription;
      final MessageReference messageReference = new NullMessageReference();
      messageReference.getMessage().setMessageId(messageAck.getFirstMessageId());
      durableTopicSubscription.getPending().remove(messageReference);
    }
  } else {
    throw new IllegalStateException("can't determine topic for sub:" + view);
  }
}
org.apache.activemq.broker.regionDestinationgetMessageStore

Popular methods of Destination

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

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • putExtra (Intent)
  • requestLocationUpdates (LocationManager)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Best plugins for Eclipse
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