ZooKeeperServerEmbedded (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper.server.embedded

## Interface ZooKeeperServerEmbedded

- All Superinterfaces:
    AutoCloseable

      @InterfaceAudience.Public
       @InterfaceStability.Evolving
      public interface ZooKeeperServerEmbedded
      extends AutoCloseable

  This API allows you to start a ZooKeeper server node from Java code

  The server will run inside the same process.

  Typical usecases are:

  - Running automated tests
  - Launch ZooKeeper server with a Java based service management system

  Please take into consideration that in production usually it is better to not run the client together with the server in order to avoid race conditions, especially around how ephemeral nodes work.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `ZooKeeperServerEmbedded.ZookKeeperServerEmbeddedBuilder` Builder for ZooKeeperServerEmbedded.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ZooKeeperServerEmbedded.ZookKeeperServerEmbeddedBuilder` | `builder()`
    `void` | `close()` Shutdown gracefully the server and wait for resources to be released.
    `void` | `start()` Start the server.

- - ### Method Detail

    - #### builder

          static ZooKeeperServerEmbedded.ZookKeeperServerEmbeddedBuilder builder()

    - #### start

          void start()
              throws Exception

      Start the server.
      Throws:
        `Exception`

    - #### close

          void close()

      Shutdown gracefully the server and wait for resources to be released.
      Specified by:
        `close` in interface `AutoCloseable`

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.