public class

ZkHelixAutoController

extends Object
implements HelixAutoController
java.lang.Object
   ↳ org.apache.helix.manager.zk.ZkHelixAutoController

Summary

Public Constructors
ZkHelixAutoController(ZkHelixConnection connection, ClusterId clusterId, ControllerId controllerId)
Public Methods
void addPreConnectCallback(PreConnectCallback callback)
add pre-connect callback
ClusterId getClusterId()
get cluster id to which this role belongs
HelixConnection getConnection()
get the underlying connection
ControllerId getControllerId()
get controller id
Id getId()
get id of this helix-role
ClusterMessagingService getMessagingService()
get the messaging-service
StateMachineEngine getStateMachineEngine()
get state machine engine
InstanceType getType()
helix-role type
boolean isLeader()
tell if this controller is leader of cluster
void onConnected()
called after connection is established
void onDisconnecting()
called before disconnect
void setLiveInstanceInfoProvider(LiveInstanceInfoProvider liveInstanceInfoProvider)
Add a LiveInstanceInfoProvider that is invoked before creating liveInstance.
void startAsync()
start helix service async
void stopAsync()
stop helix service async
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.helix.HelixAutoController
From interface org.apache.helix.HelixConnectionStateListener
From interface org.apache.helix.HelixRole
From interface org.apache.helix.HelixService

Public Constructors

public ZkHelixAutoController (ZkHelixConnection connection, ClusterId clusterId, ControllerId controllerId)

Public Methods

public void addPreConnectCallback (PreConnectCallback callback)

add pre-connect callback

public ClusterId getClusterId ()

get cluster id to which this role belongs

Returns
  • cluster id

public HelixConnection getConnection ()

get the underlying connection

Returns
  • helix-connection

public ControllerId getControllerId ()

get controller id

Returns
  • controller id

public Id getId ()

get id of this helix-role

Returns
  • id

public ClusterMessagingService getMessagingService ()

get the messaging-service

Returns
  • messaging-service

public StateMachineEngine getStateMachineEngine ()

get state machine engine

Returns
  • state machine engine

public InstanceType getType ()

helix-role type

public boolean isLeader ()

tell if this controller is leader of cluster

public void onConnected ()

called after connection is established

public void onDisconnecting ()

called before disconnect

public void setLiveInstanceInfoProvider (LiveInstanceInfoProvider liveInstanceInfoProvider)

Add a LiveInstanceInfoProvider that is invoked before creating liveInstance.
This allows applications to provide additional information that will be published to zookeeper and become available for discovery

public void startAsync ()

start helix service async

public void stopAsync ()

stop helix service async