public class

ResourceConfiguration

extends HelixProperty
java.lang.Object
   ↳ org.apache.helix.HelixProperty
     ↳ org.apache.helix.model.ResourceConfiguration

Class Overview

Persisted configuration properties for a resource

Summary

Nested Classes
enum ResourceConfiguration.Fields  
[Expand]
Inherited Fields
From class org.apache.helix.HelixProperty
Public Constructors
ResourceConfiguration(ResourceId id)
Instantiate for an id
ResourceConfiguration(ZNRecord record)
Instantiate from a record
Public Methods
<T extends ProvisionerConfig> T getProvisionerConfig(Class<T> clazz)
Get a ProvisionerConfig, if available
<T extends RebalancerConfig> T getRebalancerConfig(Class<T> clazz)
Get a RebalancerConfig if available
ResourceId getResourceId()
Get the resource that is rebalanced
UserConfig getUserConfig()
Get a backward-compatible resource user config
boolean hasRebalancerConfig()
Check if this resource config has a rebalancer config
[Expand]
Inherited Methods
From class org.apache.helix.HelixProperty
From class java.lang.Object

Public Constructors

public ResourceConfiguration (ResourceId id)

Instantiate for an id

Parameters
id resource id

public ResourceConfiguration (ZNRecord record)

Instantiate from a record

Parameters
record configuration properties

Public Methods

public T getProvisionerConfig (Class<T> clazz)

Get a ProvisionerConfig, if available

Parameters
clazz the class to cast to
Returns
  • ProvisionerConfig, or null

public T getRebalancerConfig (Class<T> clazz)

Get a RebalancerConfig if available

Returns
  • RebalancerConfig, or null

public ResourceId getResourceId ()

Get the resource that is rebalanced

Returns
  • resource id

public UserConfig getUserConfig ()

Get a backward-compatible resource user config

Returns
  • UserConfig

public boolean hasRebalancerConfig ()

Check if this resource config has a rebalancer config

Returns
  • true if a rebalancer config is attached, false otherwise