Package majordodo.embedded
Class EmbeddedBroker
- java.lang.Object
-
- majordodo.embedded.EmbeddedBroker
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class EmbeddedBroker extends java.lang.Object implements java.lang.AutoCloseableUtility to embed a Majordodo Broker- Author:
- enrico.olivelli
-
-
Constructor Summary
Constructors Constructor Description EmbeddedBroker(EmbeddedBrokerConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()majordodo.clientfacade.AuthenticationManagergetAuthenticationManager()majordodo.task.BrokergetBroker()majordodo.task.BrokerConfigurationgetBrokerConfiguration()java.lang.RunnablegetBrokerDiedCallback()This callback wil be called when the broker dies, for example in case of "leadership lost" or "broker commit log"EmbeddedBrokerConfigurationgetConfiguration()majordodo.task.GlobalResourceLimitsConfigurationgetGlobalResourceLimitsConfiguration()majordodo.task.StatusChangesLoggetStatusChangesLog()Give access to the log, this way we will let 'embeeded' users to modify BookKeeper replication parameters dynamicallymajordodo.task.TaskPropertiesMapperFunctiongetTaskPropertiesMapperFunction()voidsetAuthenticationManager(majordodo.clientfacade.AuthenticationManager authenticationManager)voidsetBrokerDiedCallback(java.lang.Runnable brokerDiedCallback)This callback wil be called when the broker dies, for example in case of "leadership lost" or "broker commit log"voidsetGlobalResourceLimitsConfiguration(majordodo.task.GlobalResourceLimitsConfiguration globalResourceLimitsConfiguration)voidsetTaskPropertiesMapperFunction(majordodo.task.TaskPropertiesMapperFunction taskPropertiesMapperFunction)voidstart()voidstop()
-
-
-
Constructor Detail
-
EmbeddedBroker
public EmbeddedBroker(EmbeddedBrokerConfiguration configuration)
-
-
Method Detail
-
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:
closein interfacejava.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:
-
-