Class KahaDBStore

java.lang.Object
org.apache.activemq.util.ServiceSupport
org.apache.activemq.store.kahadb.MessageDatabase
org.apache.activemq.store.kahadb.KahaDBStore
All Implemented Interfaces:
org.apache.activemq.broker.BrokerServiceAware, org.apache.activemq.Service, org.apache.activemq.store.NoLocalSubscriptionAware, org.apache.activemq.store.PersistenceAdapter

public class KahaDBStore extends MessageDatabase implements org.apache.activemq.store.PersistenceAdapter, org.apache.activemq.store.NoLocalSubscriptionAware
  • Field Details

    • PROPERTY_CANCELED_TASK_MOD_METRIC

      public static final String PROPERTY_CANCELED_TASK_MOD_METRIC
      See Also:
    • cancelledTaskModMetric

      public static final int cancelledTaskModMetric
    • PROPERTY_ASYNC_EXECUTOR_MAX_THREADS

      public static final String PROPERTY_ASYNC_EXECUTOR_MAX_THREADS
      See Also:
    • queueExecutor

      protected ExecutorService queueExecutor
    • topicExecutor

      protected ExecutorService topicExecutor
  • Constructor Details

    • KahaDBStore

      public KahaDBStore()
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setBrokerName

      public void setBrokerName(String brokerName)
      Specified by:
      setBrokerName in interface org.apache.activemq.store.PersistenceAdapter
    • setUsageManager

      public void setUsageManager(org.apache.activemq.usage.SystemUsage usageManager)
      Specified by:
      setUsageManager in interface org.apache.activemq.store.PersistenceAdapter
    • getUsageManager

      public org.apache.activemq.usage.SystemUsage getUsageManager()
    • isConcurrentStoreAndDispatchQueues

      public boolean isConcurrentStoreAndDispatchQueues()
      Returns:
      the concurrentStoreAndDispatch
    • setConcurrentStoreAndDispatchQueues

      public void setConcurrentStoreAndDispatchQueues(boolean concurrentStoreAndDispatch)
      Parameters:
      concurrentStoreAndDispatch - the concurrentStoreAndDispatch to set
    • isConcurrentStoreAndDispatchTopics

      public boolean isConcurrentStoreAndDispatchTopics()
      Returns:
      the concurrentStoreAndDispatch
    • setConcurrentStoreAndDispatchTopics

      public void setConcurrentStoreAndDispatchTopics(boolean concurrentStoreAndDispatch)
      Parameters:
      concurrentStoreAndDispatch - the concurrentStoreAndDispatch to set
    • getMaxAsyncJobs

      public int getMaxAsyncJobs()
      Returns:
      the maxAsyncJobs
    • setMaxAsyncJobs

      public void setMaxAsyncJobs(int maxAsyncJobs)
      Parameters:
      maxAsyncJobs - the maxAsyncJobs to set
    • configureMetadata

      protected void configureMetadata()
      Specified by:
      configureMetadata in class MessageDatabase
    • doStart

      public void doStart() throws Exception
      Overrides:
      doStart in class MessageDatabase
      Throws:
      Exception
    • doStop

      public void doStop(org.apache.activemq.util.ServiceStopper stopper) throws Exception
      Overrides:
      doStop in class MessageDatabase
      Throws:
      Exception
    • createTransactionStore

      public org.apache.activemq.store.TransactionStore createTransactionStore() throws IOException
      Specified by:
      createTransactionStore in interface org.apache.activemq.store.PersistenceAdapter
      Throws:
      IOException
    • getForceRecoverIndex

      public boolean getForceRecoverIndex()
    • setForceRecoverIndex

      public void setForceRecoverIndex(boolean forceRecoverIndex)
    • forgetRecoveredAcks

      public void forgetRecoveredAcks(ArrayList<org.apache.activemq.command.MessageAck> preparedAcks, boolean isRollback) throws IOException
      Throws:
      IOException
    • trackRecoveredAcks

      public void trackRecoveredAcks(ArrayList<org.apache.activemq.command.MessageAck> preparedAcks) throws IOException
      Throws:
      IOException
    • createQueueMessageStore

      public org.apache.activemq.store.MessageStore createQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination) throws IOException
      Specified by:
      createQueueMessageStore in interface org.apache.activemq.store.PersistenceAdapter
      Throws:
      IOException
    • createTopicMessageStore

      public org.apache.activemq.store.TopicMessageStore createTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination) throws IOException
      Specified by:
      createTopicMessageStore in interface org.apache.activemq.store.PersistenceAdapter
      Throws:
      IOException
    • removeQueueMessageStore

      public void removeQueueMessageStore(org.apache.activemq.command.ActiveMQQueue destination)
      Cleanup method to remove any state associated with the given destination. This method does not stop the message store (it might not be cached).
      Specified by:
      removeQueueMessageStore in interface org.apache.activemq.store.PersistenceAdapter
      Parameters:
      destination - Destination to forget
    • removeTopicMessageStore

      public void removeTopicMessageStore(org.apache.activemq.command.ActiveMQTopic destination)
      Cleanup method to remove any state associated with the given destination This method does not stop the message store (it might not be cached).
      Specified by:
      removeTopicMessageStore in interface org.apache.activemq.store.PersistenceAdapter
      Parameters:
      destination - Destination to forget
    • deleteAllMessages

      public void deleteAllMessages() throws IOException
      Specified by:
      deleteAllMessages in interface org.apache.activemq.store.PersistenceAdapter
      Throws:
      IOException
    • getDestinations

      public Set<org.apache.activemq.command.ActiveMQDestination> getDestinations()
      Specified by:
      getDestinations in interface org.apache.activemq.store.PersistenceAdapter
    • getLastMessageBrokerSequenceId

      public long getLastMessageBrokerSequenceId()
      Specified by:
      getLastMessageBrokerSequenceId in interface org.apache.activemq.store.PersistenceAdapter
    • getLastProducerSequenceId

      public long getLastProducerSequenceId(org.apache.activemq.command.ProducerId id)
      Specified by:
      getLastProducerSequenceId in interface org.apache.activemq.store.PersistenceAdapter
    • size

      public long size()
      Specified by:
      size in interface org.apache.activemq.store.PersistenceAdapter
    • beginTransaction

      public void beginTransaction(org.apache.activemq.broker.ConnectionContext context) throws IOException
      Specified by:
      beginTransaction in interface org.apache.activemq.store.PersistenceAdapter
      Throws:
      IOException
    • commitTransaction

      public void commitTransaction(org.apache.activemq.broker.ConnectionContext context) throws IOException
      Specified by:
      commitTransaction in interface org.apache.activemq.store.PersistenceAdapter
      Throws:
      IOException
    • rollbackTransaction

      public void rollbackTransaction(org.apache.activemq.broker.ConnectionContext context) throws IOException
      Specified by:
      rollbackTransaction in interface org.apache.activemq.store.PersistenceAdapter
      Throws:
      IOException
    • checkpoint

      public void checkpoint(boolean sync) throws IOException
      Specified by:
      checkpoint in interface org.apache.activemq.store.PersistenceAdapter
      Throws:
      IOException
    • getTransactionIdTransformer

      public org.apache.activemq.store.TransactionIdTransformer getTransactionIdTransformer()
    • setTransactionIdTransformer

      public void setTransactionIdTransformer(org.apache.activemq.store.TransactionIdTransformer transactionIdTransformer)
    • createJobSchedulerStore

      public org.apache.activemq.broker.scheduler.JobSchedulerStore createJobSchedulerStore() throws UnsupportedOperationException
      Specified by:
      createJobSchedulerStore in interface org.apache.activemq.store.PersistenceAdapter
      Throws:
      UnsupportedOperationException
    • isPersistNoLocal

      public boolean isPersistNoLocal()
      Specified by:
      isPersistNoLocal in interface org.apache.activemq.store.NoLocalSubscriptionAware