Class ZooKeeperServerEmbedded.ZookKeeperServerEmbeddedBuilder
- java.lang.Object
- 
- org.apache.zookeeper.server.embedded.ZooKeeperServerEmbedded.ZookKeeperServerEmbeddedBuilder
 
- 
- Enclosing interface:
- ZooKeeperServerEmbedded
 
 public static class ZooKeeperServerEmbedded.ZookKeeperServerEmbeddedBuilder extends Object Builder for ZooKeeperServerEmbedded.
- 
- 
Constructor SummaryConstructors Constructor Description ZookKeeperServerEmbeddedBuilder()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ZooKeeperServerEmbedded.ZookKeeperServerEmbeddedBuilderbaseDir(Path baseDir)Base directory of the server.ZooKeeperServerEmbeddedbuild()Validate the configuration and create the server, without starting it.ZooKeeperServerEmbedded.ZookKeeperServerEmbeddedBuilderconfiguration(Properties configuration)Set the contents of the main configuration as it would be in zk_server.conf file.ZooKeeperServerEmbedded.ZookKeeperServerEmbeddedBuilderexitHandler(ExitHandler exitHandler)Set the behaviour in case of hard system errors, seeExitHandler.
 
- 
- 
- 
Method Detail- 
baseDirpublic ZooKeeperServerEmbedded.ZookKeeperServerEmbeddedBuilder baseDir(Path baseDir) Base directory of the server. The system will create a temporary configuration file inside this directory. Please remember that dynamic configuration files wil be saved into this directory by default.If you do not set a 'dataDir' configuration entry the system will use a subdirectory of baseDir. - Parameters:
- baseDir-
- Returns:
- the builder
 
 - 
configurationpublic ZooKeeperServerEmbedded.ZookKeeperServerEmbeddedBuilder configuration(Properties configuration) Set the contents of the main configuration as it would be in zk_server.conf file.- Parameters:
- configuration- the configuration
- Returns:
- the builder
 
 - 
exitHandlerpublic ZooKeeperServerEmbedded.ZookKeeperServerEmbeddedBuilder exitHandler(ExitHandler exitHandler) Set the behaviour in case of hard system errors, seeExitHandler.- Parameters:
- exitHandler- the handler
- Returns:
- the builder
 
 - 
buildpublic ZooKeeperServerEmbedded build() throws Exception Validate the configuration and create the server, without starting it.- Returns:
- the new server
- Throws:
- Exception
- See Also:
- ZooKeeperServerEmbedded.start()
 
 
- 
 
-