public class

ParticipantConfig

extends Object
java.lang.Object
   ↳ org.apache.helix.api.config.ParticipantConfig

Class Overview

Configuration properties of a Helix participant

Summary

Nested Classes
class ParticipantConfig.Builder Assemble a participant  
class ParticipantConfig.Delta Update context for a ParticipantConfig  
Public Constructors
ParticipantConfig(ParticipantId id, String hostName, int port, boolean isEnabled, Set<PartitionId> disabledPartitions, Set<String> tags, UserConfig userConfig)
Initialize a participant configuration.
Public Methods
Set<PartitionId> getDisabledPartitions()
Get disabled partition id's
String getHostName()
Get the host name of the participant
ParticipantId getId()
Get the participant id
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 isEnabled()
Get if the participant is enabled
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ParticipantConfig (ParticipantId id, String hostName, int port, boolean isEnabled, Set<PartitionId> disabledPartitions, Set<String> tags, UserConfig userConfig)

Initialize a participant configuration. Also see ParticipantConfig.Builder

Parameters
id participant id
hostName host where participant can be reached
port port to use to contact participant
isEnabled true if enabled, false if disabled
disabledPartitions set of partitions, if any to disable on this participant
tags tags to set for the participant

Public Methods

public Set<PartitionId> getDisabledPartitions ()

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

Get if the participant is enabled

Returns
  • true if enabled or false otherwise