public static abstract class

BasicRebalancerConfig.AbstractBuilder

extends Object
java.lang.Object
   ↳ org.apache.helix.controller.rebalancer.config.BasicRebalancerConfig.AbstractBuilder<T extends org.apache.helix.controller.rebalancer.config.BasicRebalancerConfig.AbstractBuilder<T>>
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Abstract builder for the base rebalancer config

Summary

Public Constructors
BasicRebalancerConfig.AbstractBuilder(ResourceId resourceId)
Instantiate with a resource id
Public Methods
abstract RebalancerConfig build()
Get the rebalancer config from the built fields
T participantGroupTag(String participantGroupTag)
Set the tag that all participants require in order to serve this resource
T rebalancerRef(RebalancerRef rebalancerRef)
Specify a custom class to use for rebalancing
T serializerClass(Class<? extends StringSerializer> serializerClass)
Set the serializer class for this rebalancer config
T stateModelDefId(StateModelDefId stateModelDefId)
Set the state model definition that the resource should follow
T stateModelFactoryId(StateModelFactoryId stateModelFactoryId)
Set the state model factory that the resource should use
Protected Methods
abstract T self()
Get a typed reference to "this" class.
final void update(BasicRebalancerConfig config)
Update an existing context with base fields
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public BasicRebalancerConfig.AbstractBuilder (ResourceId resourceId)

Instantiate with a resource id

Parameters
resourceId resource id

Public Methods

public abstract RebalancerConfig build ()

Get the rebalancer config from the built fields

Returns
  • RebalancerConfig

public T participantGroupTag (String participantGroupTag)

Set the tag that all participants require in order to serve this resource

Parameters
participantGroupTag the tag
Returns
  • Builder

public T rebalancerRef (RebalancerRef rebalancerRef)

Specify a custom class to use for rebalancing

Parameters
rebalancerRef RebalancerRef instance
Returns
  • Builder

public T serializerClass (Class<? extends StringSerializer> serializerClass)

Set the serializer class for this rebalancer config

Parameters
serializerClass class that implements StringSerializer
Returns
  • Builder

public T stateModelDefId (StateModelDefId stateModelDefId)

Set the state model definition that the resource should follow

Parameters
stateModelDefId state model definition id
Returns
  • Builder

public T stateModelFactoryId (StateModelFactoryId stateModelFactoryId)

Set the state model factory that the resource should use

Parameters
stateModelFactoryId state model factory id
Returns
  • Builder

Protected Methods

protected abstract T self ()

Get a typed reference to "this" class. Final derived classes should simply return the this reference.

Returns
  • this for the most specific type

protected final void update (BasicRebalancerConfig config)

Update an existing context with base fields

Parameters
config derived config