Package org.apache.bookkeeper.shims.zk
Class ZooKeeperServerShimImpl
- java.lang.Object
-
- org.apache.bookkeeper.shims.zk.ZooKeeperServerShimImpl
-
- All Implemented Interfaces:
ZooKeeperServerShim
class ZooKeeperServerShimImpl extends java.lang.Object implements ZooKeeperServerShim
-
-
Field Summary
Fields Modifier and Type Field Description (package private) org.apache.zookeeper.server.NIOServerCnxnFactory
serverFactory
(package private) org.apache.zookeeper.server.ZooKeeperServer
zks
-
Constructor Summary
Constructors Constructor Description ZooKeeperServerShimImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialize(java.io.File snapDir, java.io.File logDir, int zkPort, int maxCC)
Initialize zookeeper server.void
start()
Start the zookeeper server.void
stop()
Stop the zookeeper server.
-
-
-
Method Detail
-
initialize
public void initialize(java.io.File snapDir, java.io.File logDir, int zkPort, int maxCC) throws java.io.IOException
Description copied from interface:ZooKeeperServerShim
Initialize zookeeper server.- Specified by:
initialize
in interfaceZooKeeperServerShim
- Parameters:
snapDir
- Snapshot Dir.logDir
- Log Dir.zkPort
- ZooKeeper Port.maxCC
- Max Concurrency for Client.- Throws:
java.io.IOException
- when failed to initialize zookeeper server.
-
start
public void start() throws java.io.IOException
Description copied from interface:ZooKeeperServerShim
Start the zookeeper server.- Specified by:
start
in interfaceZooKeeperServerShim
- Throws:
java.io.IOException
- when failed to start zookeeper server.
-
stop
public void stop()
Description copied from interface:ZooKeeperServerShim
Stop the zookeeper server.- Specified by:
stop
in interfaceZooKeeperServerShim
-
-