Package majordodo.embedded
Class EmbeddedBroker
java.lang.Object
majordodo.embedded.EmbeddedBroker
- All Implemented Interfaces:
AutoCloseable
Utility to embed a Majordodo Broker
- Author:
- enrico.olivelli
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()majordodo.clientfacade.AuthenticationManagermajordodo.task.Brokermajordodo.task.BrokerConfigurationThis callback wil be called when the broker dies, for example in case of "leadership lost" or "broker commit log"majordodo.task.GlobalResourceLimitsConfigurationmajordodo.task.StatusChangesLogGive access to the log, this way we will let 'embeeded' users to modify BookKeeper replication parameters dynamicallymajordodo.task.TaskPropertiesMapperFunctionvoidsetAuthenticationManager(majordodo.clientfacade.AuthenticationManager authenticationManager) voidsetBrokerDiedCallback(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 Details
-
EmbeddedBroker
-
-
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
This callback wil be called when the broker dies, for example in case of "leadership lost" or "broker commit log"- Returns:
-
setBrokerDiedCallback
This callback wil be called when the broker dies, for example in case of "leadership lost" or "broker commit log"- Parameters:
brokerDiedCallback-
-
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
-
stop
public void stop() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
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:
-