public class

ZkHelixParticipant

extends Object
implements HelixParticipant
java.lang.Object
   ↳ org.apache.helix.manager.zk.ZkHelixParticipant

Summary

Public Constructors
ZkHelixParticipant(ZkHelixConnection connection, ClusterId clusterId, ParticipantId participantId)
Public Methods
void addPreConnectCallback(PreConnectCallback callback)
add pre-connect callback
HelixDataAccessor getAccessor()
ClusterAccessor getClusterAccessor()
ClusterId getClusterId()
get cluster id to which this role belongs
HelixConnection getConnection()
get the underlying connection
Id getId()
get id of this helix-role
ClusterMessagingService getMessagingService()
get the messaging-service
ParticipantAccessor getParticipantAccessor()
ParticipantId getParticipantId()
get participant id
StateMachineEngine getStateMachineEngine()
get state machine engine
InstanceType getType()
helix-role type
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.HelixConnectionStateListener
From interface org.apache.helix.HelixParticipant
From interface org.apache.helix.HelixRole
From interface org.apache.helix.HelixService

Public Constructors

public ZkHelixParticipant (ZkHelixConnection connection, ClusterId clusterId, ParticipantId participantId)

Public Methods

public void addPreConnectCallback (PreConnectCallback callback)

add pre-connect callback

public HelixDataAccessor getAccessor ()

public ClusterAccessor getClusterAccessor ()

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 Id getId ()

get id of this helix-role

Returns
  • id

public ClusterMessagingService getMessagingService ()

get the messaging-service

Returns
  • messaging-service

public ParticipantAccessor getParticipantAccessor ()

public ParticipantId getParticipantId ()

get participant id

Returns
  • participant id

public StateMachineEngine getStateMachineEngine ()

get state machine engine

Returns
  • state machine engine

public InstanceType getType ()

helix-role type

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