public class

Participant

extends Object
java.lang.Object
   ↳ org.apache.helix.api.Participant

Class Overview

A cluster participant

Summary

Public Constructors
Participant(ParticipantId id, String hostName, int port, boolean isEnabled, Set<PartitionId> disabledPartitionIdSet, Set<String> tags, RunningInstance runningInstance, Map<ResourceIdCurrentState> currentStateMap, Map<MessageIdMessage> messageMap, UserConfig userConfig)
Construct a participant
Public Methods
ParticipantConfig getConfig()
Get the participant configuration
Map<ResourceIdCurrentState> getCurrentStateMap()
Get the current states of the resource
Set<PartitionId> getDisabledPartitionIds()
Get disabled partition id's
String getHostName()
Get the host name of the participant
ParticipantId getId()
Get the participant id
Map<MessageIdMessage> getMessageMap()
Get message map
int getPort()
Get the port of the participant
RunningInstance getRunningInstance()
Get the running instance
Set<String> getTags()
Get tags
UserConfig getUserConfig()
Get user-specified configuration properties of this participant
boolean hasTag(String tag)
Check if participant has a tag
boolean isAlive()
Get if the participant is alive
boolean isEnabled()
Get if the participant is enabled
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Participant (ParticipantId id, String hostName, int port, boolean isEnabled, Set<PartitionId> disabledPartitionIdSet, Set<String> tags, RunningInstance runningInstance, Map<ResourceIdCurrentState> currentStateMap, Map<MessageIdMessage> messageMap, UserConfig userConfig)

Construct a participant

Public Methods

public ParticipantConfig getConfig ()

Get the participant configuration

Returns
  • ParticipantConfig that backs this participant

public Map<ResourceIdCurrentState> getCurrentStateMap ()

Get the current states of the resource

Returns
  • map of resource-id to current state, or empty map if none

public Set<PartitionId> getDisabledPartitionIds ()

Get disabled partition id's

Returns
  • set of disabled partition id's, or empty set if none

public String getHostName ()

Get the host name of the participant

Returns
  • host name, or null if not applicable

public ParticipantId getId ()

Get the participant id

Returns
  • ParticipantId

public Map<MessageIdMessage> getMessageMap ()

Get message map

Returns
  • message map

public int getPort ()

Get the port of the participant

Returns
  • port number, or -1 if not applicable

public RunningInstance getRunningInstance ()

Get the running instance

Returns
  • running instance or null if not running

public Set<String> getTags ()

Get tags

Returns
  • set of tags

public UserConfig getUserConfig ()

Get user-specified configuration properties of this participant

Returns
  • UserConfig properties

public boolean hasTag (String tag)

Check if participant has a tag

Parameters
tag tag to check
Returns
  • true if tagged, false otherwise

public boolean isAlive ()

Get if the participant is alive

Returns
  • true if running or false otherwise

public boolean isEnabled ()

Get if the participant is enabled

Returns
  • true if enabled or false otherwise