public class

ConfigAccessor

extends Object
java.lang.Object
   ↳ org.apache.helix.ConfigAccessor

Class Overview

Provides access to the persistent configuration of the cluster, the instances that live on it, and the logical resources assigned to it.

Summary

Public Constructors
ConfigAccessor(ZkClient zkClient)
Initialize an accessor with a Zookeeper client
Public Methods
String get(ConfigScope scope, String key)
This method is deprecated. replaced by get(HelixConfigScope, String)
String get(HelixConfigScope scope, String key)
get a single config entry
Map<StringString> get(ConfigScope scope, List<String> keys)
This method is deprecated. replaced by #get(HelixConfigScope, List)
Map<StringString> get(HelixConfigScope scope, List<String> keys)
get many config entries
List<String> getKeys(HelixConfigScope scope)
Get list of config keys for a scope
List<String> getKeys(HelixConfigScope.ConfigScopeProperty type, String clusterName, String... keys)
This method is deprecated. replaced by getKeys(HelixConfigScope)
void remove(HelixConfigScope scope, List<String> keys)
Remove multiple configs
void remove(HelixConfigScope scope, String key)
Remove a single config
void remove(ConfigScope scope, List<String> keys)
This method is deprecated. replaced by #remove(HelixConfigScope, List)
void remove(ConfigScope scope, String key)
This method is deprecated. replaced by remove(HelixConfigScope, String)
void set(ConfigScope scope, String key, String value)
This method is deprecated. replaced by set(HelixConfigScope, String, String)
void set(HelixConfigScope scope, String key, String value)
Set config, creating it if it doesn't exist
void set(ConfigScope scope, Map<StringString> keyValueMap)
This method is deprecated. replaced by #set(HelixConfigScope, Map)
void set(HelixConfigScope scope, Map<StringString> keyValueMap)
Set multiple configs, creating them if they don't exist
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ConfigAccessor (ZkClient zkClient)

Initialize an accessor with a Zookeeper client

Public Methods

public String get (ConfigScope scope, String key)

This method is deprecated.
replaced by get(HelixConfigScope, String)

get config

Returns
  • value or null if doesn't exist

public String get (HelixConfigScope scope, String key)

get a single config entry

Parameters
scope specification of the entity set to query (e.g. cluster, resource, participant, etc.)
key the identifier of the configuration entry
Returns
  • the configuration entry

public Map<StringString> get (ConfigScope scope, List<String> keys)

This method is deprecated.
replaced by #get(HelixConfigScope, List)

get configs

public Map<StringString> get (HelixConfigScope scope, List<String> keys)

get many config entries

Parameters
scope scope specification of the entity set to query (e.g. cluster, resource, participant, etc.)
keys the identifiers of the configuration entries
Returns
  • the configuration entries, organized by key

public List<String> getKeys (HelixConfigScope scope)

Get list of config keys for a scope

Returns
  • a list of configuration keys

public List<String> getKeys (HelixConfigScope.ConfigScopeProperty type, String clusterName, String... keys)

This method is deprecated.
replaced by getKeys(HelixConfigScope)

get config keys

public void remove (HelixConfigScope scope, List<String> keys)

Remove multiple configs

Parameters
scope scope specification of the entity set to query (e.g. cluster, resource, participant, etc.)
keys the identifiers of the configuration entries

public void remove (HelixConfigScope scope, String key)

Remove a single config

Parameters
scope scope specification of the entity set to query (e.g. cluster, resource, participant, etc.)
key the identifier of the configuration entry

public void remove (ConfigScope scope, List<String> keys)

This method is deprecated.
replaced by #remove(HelixConfigScope, List)

remove configs

public void remove (ConfigScope scope, String key)

This method is deprecated.
replaced by remove(HelixConfigScope, String)

Remove config

public void set (ConfigScope scope, String key, String value)

This method is deprecated.
replaced by set(HelixConfigScope, String, String)

Set config, create if not exist

public void set (HelixConfigScope scope, String key, String value)

Set config, creating it if it doesn't exist

Parameters
scope scope specification of the entity set to query (e.g. cluster, resource, participant, etc.)
key the identifier of the configuration entry
value the configuration

public void set (ConfigScope scope, Map<StringString> keyValueMap)

This method is deprecated.
replaced by #set(HelixConfigScope, Map)

Set configs, create if not exist

public void set (HelixConfigScope scope, Map<StringString> keyValueMap)

Set multiple configs, creating them if they don't exist

Parameters
scope scope specification of the entity set to query (e.g. cluster, resource, participant, etc.)
keyValueMap configurations organized by their identifiers