public class

Participant

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

Class Overview

A cluster participant

Summary

Public Constructors
Participant(ParticipantConfig participantConfig, LiveInstance liveInstance, Map<ResourceIdCurrentState> currentStateMap, Map<MessageIdMessage> messageMap, ContainerConfig containerConfig)
Construct a participant
Public Methods
ParticipantConfig getConfig()
Get the participant configuration
ContainerConfig getContainerConfig()
Get the container config (if any)
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
InstanceConfig getInstanceConfig()
Get the physical InstanceConfig that this participant is configured with
LiveInstance getLiveInstance()
Get the running instance
Map<MessageIdMessage> getMessageMap()
Get message map
int getPort()
Get the port of the participant
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 (ParticipantConfig participantConfig, LiveInstance liveInstance, Map<ResourceIdCurrentState> currentStateMap, Map<MessageIdMessage> messageMap, ContainerConfig containerConfig)

Construct a participant

Public Methods

public ParticipantConfig getConfig ()

Get the participant configuration

Returns
  • ParticipantConfig that backs this participant

public ContainerConfig getContainerConfig ()

Get the container config (if any)

Returns
  • ContainerConfig for the container associated with 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 InstanceConfig getInstanceConfig ()

Get the physical InstanceConfig that this participant is configured with

Returns
  • InstanceConfig instance

public LiveInstance getLiveInstance ()

Get the running instance

Returns
  • running instance or null if not running

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 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