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()
get data accessor
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
ParticipantId getParticipantId()
get participant id
StateMachineEngine getStateMachineEngine()
get state machine engine
InstanceType getType()
helix-role type
boolean isStarted()
is service started
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 start()
start helix service
void stop()
stop helix service
[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 ()

get data accessor

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 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 boolean isStarted ()

is service started

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 start ()

start helix service

public void stop ()

stop helix service