aboutsummaryrefslogtreecommitdiffstats
path: root/zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/VespaZooKeeperServer.java
blob: 13b395a97f21b4c6eb34fb5d6718730ea9a2fad4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.zookeeper;

import java.nio.file.Path;

/**
 * Interface for a component that starts/stops a ZooKeeper server. Implementations should make sure
 * that the server is up and accepts connection (typically by returning from constructor only after
 * writing a node to ZooKeeper successfully).
 *
 * @author hmusum
 */
public interface VespaZooKeeperServer {

    /** Shut down the server. Blocks until shutdown has completed */
    void shutdown();

    /** Start the server with the given config file */
    void start(Path configFilePath);

    /** Whether this server support dynamic reconfiguration */
    boolean reconfigurable();

}