Tabnine Logo
org.apache.activemq.broker.region
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.activemq.broker.region

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

origin: apache/activemq

@Override
protected boolean canDispatch(MessageReference n) throws IOException {
  boolean result = true;
  QueueMessageReference node = (QueueMessageReference)n;
  if (node.isAcked() || node.isDropped()) {
    result = false;
  }
  result = result && (isBrowser() || node.lock(this));
  return result;
}
origin: apache/activemq

public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception {
  if (next instanceof DestinationFilter) {
    DestinationFilter filter = (DestinationFilter) next;
    filter.deleteSubscription(context, key);
  } else if (next instanceof Topic) {
    Topic topic = (Topic)next;
    topic.deleteSubscription(context, key);
  }
}
origin: apache/activemq

@Override
public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception {
  // do dispatch
  Subscription sub = getMatchingSubscription(messageDispatchNotification);
  if (sub != null) {
    MessageReference message = getMatchingMessage(messageDispatchNotification);
    sub.add(message);
    sub.processMessageDispatchNotification(messageDispatchNotification);
  }
}
origin: apache/activemq

@Override
public void onSuccess() {
  Destination regionDestination = (Destination) node.getRegionDestination();
  regionDestination.getDestinationStatistics().getDispatched().increment();
  regionDestination.getDestinationStatistics().getInflight().increment();
  node.decrementReferenceCount();
}
origin: apache/activemq

/**
 * store will have a pending ack for all durables, irrespective of the
 * selector so we need to ack if node is un-matched
 */
@Override
public void unmatched(MessageReference node) throws IOException {
  MessageAck ack = new MessageAck();
  ack.setAckType(MessageAck.UNMATCHED_ACK_TYPE);
  ack.setMessageID(node.getMessageId());
  Destination regionDestination = (Destination) node.getRegionDestination();
  regionDestination.acknowledge(this.getContext(), this, ack, node);
}
origin: apache/activemq

protected void dispose(ConnectionContext context, Destination dest) throws Exception {
  dest.dispose(context);
  dest.stop();
  destinationFactory.removeDestination(dest);
}
origin: apache/activemq

@Override
public void resetStatistics() {
  destination.getDestinationStatistics().reset();
}
origin: apache/activemq

@Override
public void dispatchPending() throws IOException {
  if (isActive()) {
    super.dispatchPending();
  }
}
origin: apache/activemq

  @Override
  public void afterRollback() throws Exception {
    reference.setAcked(false);
    wakeup();
  }
});
origin: apache/activemq

/**
 * Removes the messages matching the given selector up to the maximum number
 * of matched messages
 *
 * @return the number of messages removed
 */
public int removeMatchingMessages(String selector, int maximumMessages) throws Exception {
  return removeMatchingMessages(createSelectorFilter(selector), maximumMessages);
}
origin: apache/activemq

public void resumeDispatch() {
  dispatchSelector.resume();
  wakeup();
}
origin: apache/activemq

@Override
public void resetStatistics() {
  if (subscription != null && subscription.getSubscriptionStatistics() != null){
    subscription.getSubscriptionStatistics().reset();
  }
}
origin: apache/activemq

private boolean hasDurableSubChanged(SubscriptionInfo info1, ConsumerInfo info2) throws IOException {
  if (hasSelectorChanged(info1, info2)) {
    return true;
  }
  return hasNoLocalChanged(info1, info2);
}
origin: apache/activemq

public void remove(Destination destination) {
  for (int i = 0; i < interceptors.length; i++) {
    interceptors[i].remove(destination);
  } 
}
origin: apache/activemq

/**
 * @return number of messages that matched the subscription
 */
@Override
public long getDispatchedCounter() {
  return subscription != null ? subscription.getDispatchedCounter() : 0;
}
origin: apache/activemq

@Override
public void afterCommit() throws Exception {
  dropMessage(reference);
  wakeup();
}
origin: apache/activemq

public void wakeupDestinationsForDispatch() {
  for (Destination dest : destinations) {
    dest.wakeup();
  }
}
origin: apache/activemq

/**
 *
 * @return the interval at which warning about blocked producers will be
 *         triggered.
 */
@Override
public long getBlockedProducerWarningInterval() {
  return destination.getBlockedProducerWarningInterval();
}
origin: apache/activemq

  @Override
  public boolean isPaused() {
    Queue queue = (Queue) destination;
    return queue.isDispatchPaused();
  }
}
origin: apache/activemq

  @Override
  public void onFailure() {
    Destination regionDestination = (Destination) node.getRegionDestination();
    regionDestination.getDestinationStatistics().getDispatched().increment();
    regionDestination.getDestinationStatistics().getInflight().increment();
    node.decrementReferenceCount();
  }
});
org.apache.activemq.broker.region

Most used classes

  • Destination
  • DestinationStatistics
    The J2EE Statistics for the a Destination.
  • Subscription
  • PolicyEntry
    Represents an entry in a PolicyMap for assigning policies to a specific destination or a hierarchica
  • PolicyMap
    Represents a destination based configuration of policies so that individual destinations or wildcard
  • RegionBroker,
  • BaseDestination,
  • CompositeDestinationInterceptor,
  • DestinationFilter,
  • DurableTopicSubscription,
  • PrefetchSubscription,
  • Queue,
  • QueueRegion,
  • Region,
  • Topic,
  • TopicRegion,
  • LastImageSubscriptionRecoveryPolicy,
  • RedeliveryPolicyMap,
  • CompositeQueue
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