public class

RoutingTableProvider

extends Object
implements ExternalViewChangeListener InstanceConfigChangeListener
java.lang.Object
   ↳ org.apache.helix.spectator.RoutingTableProvider
Known Direct Subclasses

Summary

Public Constructors
RoutingTableProvider()
Public Methods
InstanceConfig getInstanceConfig(String instanceName)
Get the configuration of an instance from its name
Set<InstanceConfig> getInstances(String resource, String state)
returns all instances for {resource} that are in a specific {state}
List<InstanceConfig> getInstances(String resourceName, String partitionName, String state)
returns the instances for {resource,partition} pair that are in a specific {state}
void onExternalViewChange(List<ExternalView> externalViewList, NotificationContext changeContext)
Invoked when external view changes
void onInstanceConfigChange(List<InstanceConfig> configs, NotificationContext changeContext)
Invoked when participant config changes
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.helix.ExternalViewChangeListener
From interface org.apache.helix.InstanceConfigChangeListener

Public Constructors

public RoutingTableProvider ()

Public Methods

public InstanceConfig getInstanceConfig (String instanceName)

Get the configuration of an instance from its name

Parameters
instanceName the instance ID
Returns
  • InstanceConfig if present, null otherwise

public Set<InstanceConfig> getInstances (String resource, String state)

returns all instances for {resource} that are in a specific {state}

Returns
  • empty list if there is no instance in a given state

public List<InstanceConfig> getInstances (String resourceName, String partitionName, String state)

returns the instances for {resource,partition} pair that are in a specific {state}

Parameters
resourceName -
Returns
  • empty list if there is no instance in a given state

public void onExternalViewChange (List<ExternalView> externalViewList, NotificationContext changeContext)

Invoked when external view changes

Parameters
externalViewList a list of ExternalViews
changeContext the change event and state

public void onInstanceConfigChange (List<InstanceConfig> configs, NotificationContext changeContext)

Invoked when participant config changes