public class

RoutingTableProvider

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

Summary

Public Constructors
RoutingTableProvider()
Public Methods
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 onConfigChange(List<InstanceConfig> configs, NotificationContext changeContext)
Invoked when participant config changes
void onExternalViewChange(List<ExternalView> externalViewList, NotificationContext changeContext)
Invoked when external view changes
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.helix.ConfigChangeListener
From interface org.apache.helix.ExternalViewChangeListener

Public Constructors

public RoutingTableProvider ()

Public Methods

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 onConfigChange (List<InstanceConfig> configs, NotificationContext changeContext)

Invoked when participant config changes

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