public class ControllerService extends Object
Modifier and Type | Field and Description |
---|---|
protected QuorumPeerConfig |
config |
protected QuorumPeer |
quorumPeer |
Constructor and Description |
---|
ControllerService() |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup() |
protected void |
initConfig(String[] args)
Derived classes may override to do custom initialization of command line args.
|
void |
initializeAndRun(String[] args)
Runs the main loop for this application but does not exit the process.
|
protected void |
initService()
Initializes an instance of the ZooKeeperServer, the ZooKeeperServerController, and a new
Http listener (CommandListener) for the controller.
|
boolean |
isReady()
Is the service up with all necessary initialization and port opening complete?
|
static void |
main(String[] args)
Starts the ControllerService as a stand alone app.
|
protected void |
run() |
void |
runFromConfig(QuorumPeerConfig config)
Run the app given a QuorumPeerConfig.
|
protected void |
runServices() |
void |
shutdown() |
Thread |
start(ControllerServerConfig controllerConfig)
Starts a new thread to run the controller (useful when this service is hosted in process
- such as during unit testing).
|
protected QuorumPeerConfig config
protected QuorumPeer quorumPeer
public static void main(String[] args)
public Thread start(ControllerServerConfig controllerConfig)
public void shutdown()
protected void initService() throws IOException
IOException
protected void runServices()
protected void cleanup()
public void initializeAndRun(String[] args) throws QuorumPeerConfig.ConfigException
QuorumPeerConfig.ConfigException
protected void initConfig(String[] args) throws QuorumPeerConfig.ConfigException
QuorumPeerConfig.ConfigException
public void runFromConfig(QuorumPeerConfig config)
config
- The quorum peer config.protected void run()
public boolean isReady()
Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.