public class

ResolverRoutingTable

extends RoutingTableProvider
java.lang.Object
   ↳ org.apache.helix.spectator.RoutingTableProvider
     ↳ org.apache.helix.resolver.ResolverRoutingTable

Class Overview

A routing table that can also return all resources, partitions, and states in the cluster

Summary

Public Constructors
ResolverRoutingTable()
Create the table.
Public Methods
synchronized Set<String> getPartitions(String resource)
Get all partitions currently served for a resource.
synchronized Set<String> getResources()
Get all resources that are currently served in the cluster.
synchronized Set<String> getStates()
Get all states that partitions of all resources are currently in
synchronized void onExternalViewChange(List<ExternalView> externalViewList, NotificationContext changeContext)
Invoked when external view changes
[Expand]
Inherited Methods
From class org.apache.helix.spectator.RoutingTableProvider
From class java.lang.Object
From interface org.apache.helix.ExternalViewChangeListener
From interface org.apache.helix.InstanceConfigChangeListener

Public Constructors

public ResolverRoutingTable ()

Create the table.

Public Methods

public synchronized Set<String> getPartitions (String resource)

Get all partitions currently served for a resource.

Parameters
resource the resource for which to look up partitions
Returns
  • set of partition names

public synchronized Set<String> getResources ()

Get all resources that are currently served in the cluster.

Returns
  • set of resource names

public synchronized Set<String> getStates ()

Get all states that partitions of all resources are currently in

Returns
  • set of state names

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

Invoked when external view changes

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