Tabnine Logo
Broker.getDestinationMap
Code IndexAdd Tabnine to your IDE (free)

How to use
getDestinationMap
method
in
org.apache.activemq.broker.Broker

Best Java code snippets using org.apache.activemq.broker.Broker.getDestinationMap (Showing top 19 results out of 315)

origin: apache/activemq

@Override
public Map<ActiveMQDestination, Destination> getDestinationMap() {
  return getNext().getDestinationMap();
}
origin: apache/activemq

@Override
public Map<ActiveMQDestination, Destination> getDestinationMap(ActiveMQDestination destination) {
  return getNext().getDestinationMap(destination);
}
origin: apache/activemq

public boolean checkQueueSize(String queueName) {
  long count = 0;
  long queueSize = 0;
  Map<ActiveMQDestination, Destination> destinationMap = regionBroker.getDestinationMap();
  for (Map.Entry<ActiveMQDestination, Destination> entry : destinationMap.entrySet()) {
    if (entry.getKey().isQueue()) {
      if (entry.getValue().getName().matches(queueName)) {
        queueSize = entry.getValue().getDestinationStatistics().getMessages().getCount();
        count += queueSize;
        if (queueSize > 0) {
          LOG.info("Queue has pending message: {} queueSize is: {}", entry.getValue().getName(), queueSize);
        }
      }
    }
  }
  return count == 0;
}
origin: pierre/meteo

public Map<ActiveMQDestination, Destination> getDestinationMap() {
  return next.getDestinationMap();
}
origin: org.apache.activemq/activemq-broker

@Override
public Map<ActiveMQDestination, Destination> getDestinationMap(ActiveMQDestination destination) {
  return getNext().getDestinationMap(destination);
}
origin: org.apache.activemq/activemq-broker

@Override
public Map<ActiveMQDestination, Destination> getDestinationMap() {
  return getNext().getDestinationMap();
}
origin: org.apache.activemq/activemq-all

@Override
public Map<ActiveMQDestination, Destination> getDestinationMap() {
  return getNext().getDestinationMap();
}
origin: org.apache.activemq/activemq-all

@Override
public Map<ActiveMQDestination, Destination> getDestinationMap(ActiveMQDestination destination) {
  return getNext().getDestinationMap(destination);
}
origin: org.apache.activemq/activemq-osgi

@Override
public Map<ActiveMQDestination, Destination> getDestinationMap(ActiveMQDestination destination) {
  return getNext().getDestinationMap(destination);
}
origin: org.apache.activemq/activemq-osgi

@Override
public Map<ActiveMQDestination, Destination> getDestinationMap() {
  return getNext().getDestinationMap();
}
origin: pierre/meteo

public Map<ActiveMQDestination, Destination> getDestinationMap() {
  return getNext().getDestinationMap();
}
origin: org.apache.activemq/activemq-osgi

public boolean checkQueueSize(String queueName) {
  long count = 0;
  long queueSize = 0;
  Map<ActiveMQDestination, Destination> destinationMap = regionBroker.getDestinationMap();
  for (Map.Entry<ActiveMQDestination, Destination> entry : destinationMap.entrySet()) {
    if (entry.getKey().isQueue()) {
      if (entry.getValue().getName().matches(queueName)) {
        queueSize = entry.getValue().getDestinationStatistics().getMessages().getCount();
        count += queueSize;
        if (queueSize > 0) {
          LOG.info("Queue has pending message: {} queueSize is: {}", entry.getValue().getName(), queueSize);
        }
      }
    }
  }
  return count == 0;
}
origin: org.apache.activemq/activemq-all

public boolean checkQueueSize(String queueName) {
  long count = 0;
  long queueSize = 0;
  Map<ActiveMQDestination, Destination> destinationMap = regionBroker.getDestinationMap();
  for (Map.Entry<ActiveMQDestination, Destination> entry : destinationMap.entrySet()) {
    if (entry.getKey().isQueue()) {
      if (entry.getValue().getName().matches(queueName)) {
        queueSize = entry.getValue().getDestinationStatistics().getMessages().getCount();
        count += queueSize;
        if (queueSize > 0) {
          LOG.info("Queue has pending message: {} queueSize is: {}", entry.getValue().getName(), queueSize);
        }
      }
    }
  }
  return count == 0;
}
origin: org.apache.activemq/activemq-broker

public boolean checkQueueSize(String queueName) {
  long count = 0;
  long queueSize = 0;
  Map<ActiveMQDestination, Destination> destinationMap = regionBroker.getDestinationMap();
  for (Map.Entry<ActiveMQDestination, Destination> entry : destinationMap.entrySet()) {
    if (entry.getKey().isQueue()) {
      if (entry.getValue().getName().matches(queueName)) {
        queueSize = entry.getValue().getDestinationStatistics().getMessages().getCount();
        count += queueSize;
        if (queueSize > 0) {
          LOG.info("Queue has pending message: {} queueSize is: {}", entry.getValue().getName(), queueSize);
        }
      }
    }
  }
  return count == 0;
}
origin: pierre/meteo

public boolean checkQueueSize(String queueName) {
  long count = 0;
  long queueSize = 0;
  Map<ActiveMQDestination, Destination> destinationMap = regionBroker.getDestinationMap();
  for (Map.Entry<ActiveMQDestination, Destination> entry : destinationMap.entrySet()) {
    if (entry.getKey().isQueue()) {
      if (entry.getValue().getName().matches(queueName)) {
        queueSize = entry.getValue().getDestinationStatistics().getMessages().getCount();
        count += queueSize;
        if (queueSize > 0) {
          LOG.info("Queue has pending message:" + entry.getValue().getName() + " queueSize is:"
              + queueSize);
        }
      }
    }
  }
  return count == 0;
}
origin: powertac/powertac-server

public Set<String> processQueues ()
{
 BrokerService brokerService = getProvider();
 if (brokerService == null) {
  log.debug("processQueues - JMS Server has not been started");
  return null;
 }
 Set<String> badQueues = new HashSet<String>();
 try {
  Broker broker = brokerService.getBroker();
  Map<ActiveMQDestination, Destination> dstMap = broker.getDestinationMap();
  for (Map.Entry<ActiveMQDestination, Destination> entry: dstMap.entrySet()) {
   ActiveMQDestination amqDestination = entry.getKey();
   Destination destination = entry.getValue();
   if (destinationLimitReached(destination)) {
    badQueues.add(destination.getName());
    deleteDestination(broker, amqDestination, destination);
   }
  }
 }
 catch (Exception e) {
  log.error("Encounter exception while getting jms broker", e);
 }
 return badQueues;
}
origin: org.apache.activemq/activemq-osgi

@Override
protected void onRecovered(Tx tx) {
  for (RemoveMessageCommand removeMessageCommand: tx.acks) {
    if (removeMessageCommand instanceof LastAckCommand) {
      LastAckCommand lastAckCommand = (LastAckCommand) removeMessageCommand;
      JDBCTopicMessageStore jdbcTopicMessageStore = (JDBCTopicMessageStore) topicStores.get(lastAckCommand.getMessageAck().getDestination());
      jdbcTopicMessageStore.pendingCompletion(lastAckCommand.getClientId(), lastAckCommand.getSubName(), lastAckCommand.getSequence(), lastAckCommand.getPriority());
      lastAckCommand.setMessageStore(jdbcTopicMessageStore);
    } else {
      // when reading the store we ignore messages with non null XIDs but should include those with XIDS starting in - (pending acks in an xa transaction),
      // but the sql is non portable to match BLOB with LIKE etc
      // so we make up for it when we recover the ack
      ((JDBCPersistenceAdapter)persistenceAdapter).getBrokerService().getRegionBroker().getDestinationMap().get(removeMessageCommand.getMessageAck().getDestination()).getDestinationStatistics().getMessages().increment();
    }
  }
  for (AddMessageCommand addMessageCommand : tx.messages) {
    ActiveMQDestination destination = addMessageCommand.getMessage().getDestination();
    addMessageCommand.setMessageStore(destination.isQueue() ? queueStores.get(destination) : topicStores.get(destination));
  }
}
origin: org.apache.activemq/activemq-all

@Override
protected void onRecovered(Tx tx) {
  for (RemoveMessageCommand removeMessageCommand: tx.acks) {
    if (removeMessageCommand instanceof LastAckCommand) {
      LastAckCommand lastAckCommand = (LastAckCommand) removeMessageCommand;
      JDBCTopicMessageStore jdbcTopicMessageStore = (JDBCTopicMessageStore) topicStores.get(lastAckCommand.getMessageAck().getDestination());
      jdbcTopicMessageStore.pendingCompletion(lastAckCommand.getClientId(), lastAckCommand.getSubName(), lastAckCommand.getSequence(), lastAckCommand.getPriority());
      lastAckCommand.setMessageStore(jdbcTopicMessageStore);
    } else {
      // when reading the store we ignore messages with non null XIDs but should include those with XIDS starting in - (pending acks in an xa transaction),
      // but the sql is non portable to match BLOB with LIKE etc
      // so we make up for it when we recover the ack
      ((JDBCPersistenceAdapter)persistenceAdapter).getBrokerService().getRegionBroker().getDestinationMap().get(removeMessageCommand.getMessageAck().getDestination()).getDestinationStatistics().getMessages().increment();
    }
  }
  for (AddMessageCommand addMessageCommand : tx.messages) {
    ActiveMQDestination destination = addMessageCommand.getMessage().getDestination();
    addMessageCommand.setMessageStore(destination.isQueue() ? queueStores.get(destination) : topicStores.get(destination));
  }
}
origin: org.apache.activemq/activemq-jdbc-store

@Override
protected void onRecovered(Tx tx) {
  for (RemoveMessageCommand removeMessageCommand: tx.acks) {
    if (removeMessageCommand instanceof LastAckCommand) {
      LastAckCommand lastAckCommand = (LastAckCommand) removeMessageCommand;
      JDBCTopicMessageStore jdbcTopicMessageStore = (JDBCTopicMessageStore) topicStores.get(lastAckCommand.getMessageAck().getDestination());
      jdbcTopicMessageStore.pendingCompletion(lastAckCommand.getClientId(), lastAckCommand.getSubName(), lastAckCommand.getSequence(), lastAckCommand.getPriority());
      lastAckCommand.setMessageStore(jdbcTopicMessageStore);
    } else {
      // when reading the store we ignore messages with non null XIDs but should include those with XIDS starting in - (pending acks in an xa transaction),
      // but the sql is non portable to match BLOB with LIKE etc
      // so we make up for it when we recover the ack
      ((JDBCPersistenceAdapter)persistenceAdapter).getBrokerService().getRegionBroker().getDestinationMap().get(removeMessageCommand.getMessageAck().getDestination()).getDestinationStatistics().getMessages().increment();
    }
  }
  for (AddMessageCommand addMessageCommand : tx.messages) {
    ActiveMQDestination destination = addMessageCommand.getMessage().getDestination();
    addMessageCommand.setMessageStore(destination.isQueue() ? queueStores.get(destination) : topicStores.get(destination));
  }
}
org.apache.activemq.brokerBrokergetDestinationMap

Javadoc

return a reference destination map of a region based on the destination type

Popular methods of Broker

  • getAdaptor
    Get a Broker from the Broker Stack that is a particular class
  • removeDestination
  • commitTransaction
    Commits a transaction.
  • forgetTransaction
    Forgets a transaction.
  • getBrokerService
  • getClients
  • getDestinations
  • getPreparedTransactions
    Gets a list of all the prepared xa transactions.
  • getVmConnectorURI
  • removeConsumer
  • acknowledge
  • addBroker
    A remote Broker connects
  • acknowledge,
  • addBroker,
  • addConnection,
  • addConsumer,
  • addDestination,
  • addDestinationInfo,
  • addProducer,
  • addSession,
  • beginTransaction

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Top Sublime Text plugins
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