Class EmbeddedBroker

java.lang.Object
majordodo.embedded.EmbeddedBroker
All Implemented Interfaces:
java.lang.AutoCloseable

public class EmbeddedBroker
extends java.lang.Object
implements java.lang.AutoCloseable
Utility to embed a Majordodo Broker
Author:
enrico.olivelli
  • Constructor Details

  • Method Details

    • getGlobalResourceLimitsConfiguration

      public majordodo.task.GlobalResourceLimitsConfiguration getGlobalResourceLimitsConfiguration()
    • setGlobalResourceLimitsConfiguration

      public void setGlobalResourceLimitsConfiguration​(majordodo.task.GlobalResourceLimitsConfiguration globalResourceLimitsConfiguration)
    • getAuthenticationManager

      public majordodo.clientfacade.AuthenticationManager getAuthenticationManager()
    • setAuthenticationManager

      public void setAuthenticationManager​(majordodo.clientfacade.AuthenticationManager authenticationManager)
    • getBrokerDiedCallback

      public java.lang.Runnable getBrokerDiedCallback()
      This callback wil be called when the broker dies, for example in case of "leadership lost" or "broker commit log"
      Returns:
    • setBrokerDiedCallback

      public void setBrokerDiedCallback​(java.lang.Runnable brokerDiedCallback)
      This callback wil be called when the broker dies, for example in case of "leadership lost" or "broker commit log"
      Parameters:
      brokerDiedCallback -
    • getConfiguration

      public EmbeddedBrokerConfiguration getConfiguration()
    • getTaskPropertiesMapperFunction

      public majordodo.task.TaskPropertiesMapperFunction getTaskPropertiesMapperFunction()
    • setTaskPropertiesMapperFunction

      public void setTaskPropertiesMapperFunction​(majordodo.task.TaskPropertiesMapperFunction taskPropertiesMapperFunction)
    • getBroker

      public majordodo.task.Broker getBroker()
    • getBrokerConfiguration

      public majordodo.task.BrokerConfiguration getBrokerConfiguration()
    • start

      public void start() throws java.lang.Exception
      Throws:
      java.lang.Exception
    • stop

      public void stop()
    • close

      public void close()
      Specified by:
      close in interface java.lang.AutoCloseable
    • getStatusChangesLog

      public majordodo.task.StatusChangesLog getStatusChangesLog()
      Give access to the log, this way we will let 'embeeded' users to modify BookKeeper replication parameters dynamically
      Returns: