aboutsummaryrefslogtreecommitdiffstats
path: root/zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/server/VespaZooKeeperServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/server/VespaZooKeeperServer.java')
-rw-r--r--zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/server/VespaZooKeeperServer.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/server/VespaZooKeeperServer.java b/zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/server/VespaZooKeeperServer.java
new file mode 100644
index 00000000000..0eddf5175d4
--- /dev/null
+++ b/zookeeper-server/zookeeper-server-common/src/main/java/com/yahoo/vespa/zookeeper/server/VespaZooKeeperServer.java
@@ -0,0 +1,24 @@
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.vespa.zookeeper.server;
+
+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();
+
+}