public class ConfigurationImpl extends Object implements Configuration
| Constructor and Description |
|---|
ConfigurationImpl(ModuleShardConfigProvider provider) |
ConfigurationImpl(String moduleShardsConfigPath,
String modulesConfigPath) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMemberReplicaForShard(String shardName,
org.opendaylight.controller.cluster.access.concepts.MemberName newMemberName)
Adds the given member as the new replica for the given shardName.
|
void |
addModuleShardConfiguration(ModuleShardConfiguration config)
Adds a new configuration for a module and shard.
|
void |
addPrefixShardConfiguration(PrefixShardConfiguration config)
Adds a new configuration for a shard based on prefix.
|
Map<org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier,PrefixShardConfiguration> |
getAllPrefixShardConfigurations()
Returns the configuration for all configured prefix shards.
|
Set<String> |
getAllShardNames()
Returns all the configured shard names.
|
Collection<org.opendaylight.controller.cluster.access.concepts.MemberName> |
getMembersFromShardName(String shardName)
Returns the member replicas for the given shard name.
|
Collection<String> |
getMemberShardNames(org.opendaylight.controller.cluster.access.concepts.MemberName memberName)
Returns all the shard names that belong on the member by the given name.
|
String |
getModuleNameFromNameSpace(String nameSpace)
Returns the module name for the given namespace name or null if not found.
|
String |
getShardNameForModule(String moduleName)
Returns the first shard name corresponding to the given module name or null if none is configured.
|
String |
getShardNameForPrefix(org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier prefix)
Return the shard name corresponding to the prefix, or null if none is configured.
|
ShardStrategy |
getStrategyForModule(String moduleName)
Returns the ShardStrategy for the given module name or null if the module is not found.
|
ShardStrategy |
getStrategyForPrefix(org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier prefix)
Returns the ShardStrategy for the given prefix or null if the prefix is not found.
|
Collection<org.opendaylight.controller.cluster.access.concepts.MemberName> |
getUniqueMemberNamesForAllShards()
Returns a unique set of all member names configured for all shards.
|
boolean |
isShardConfigured(String shardName) |
void |
removeMemberReplicaForShard(String shardName,
org.opendaylight.controller.cluster.access.concepts.MemberName newMemberName)
Removes the given member as a replica for the given shardName.
|
void |
removePrefixShardConfiguration(org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier prefix)
Removes a shard configuration for the specified prefix.
|
public ConfigurationImpl(ModuleShardConfigProvider provider)
public Collection<String> getMemberShardNames(org.opendaylight.controller.cluster.access.concepts.MemberName memberName)
ConfigurationgetMemberShardNames in interface Configurationpublic String getModuleNameFromNameSpace(String nameSpace)
ConfigurationgetModuleNameFromNameSpace in interface Configurationpublic ShardStrategy getStrategyForModule(String moduleName)
ConfigurationgetStrategyForModule in interface Configurationpublic String getShardNameForModule(String moduleName)
ConfigurationgetShardNameForModule in interface Configuration@Nullable public String getShardNameForPrefix(@Nonnull org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier prefix)
ConfigurationgetShardNameForPrefix in interface Configurationpublic Collection<org.opendaylight.controller.cluster.access.concepts.MemberName> getMembersFromShardName(String shardName)
ConfigurationgetMembersFromShardName in interface Configurationpublic Set<String> getAllShardNames()
ConfigurationgetAllShardNames in interface Configurationpublic Collection<org.opendaylight.controller.cluster.access.concepts.MemberName> getUniqueMemberNamesForAllShards()
ConfigurationgetUniqueMemberNamesForAllShards in interface Configurationpublic void addModuleShardConfiguration(ModuleShardConfiguration config)
ConfigurationaddModuleShardConfiguration in interface Configurationpublic void addPrefixShardConfiguration(@Nonnull PrefixShardConfiguration config)
ConfigurationaddPrefixShardConfiguration in interface Configurationpublic void removePrefixShardConfiguration(@Nonnull org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier prefix)
ConfigurationremovePrefixShardConfiguration in interface Configurationpublic Map<org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier,PrefixShardConfiguration> getAllPrefixShardConfigurations()
ConfigurationgetAllPrefixShardConfigurations in interface Configurationpublic boolean isShardConfigured(String shardName)
isShardConfigured in interface Configurationpublic void addMemberReplicaForShard(String shardName, org.opendaylight.controller.cluster.access.concepts.MemberName newMemberName)
ConfigurationaddMemberReplicaForShard in interface Configurationpublic void removeMemberReplicaForShard(String shardName, org.opendaylight.controller.cluster.access.concepts.MemberName newMemberName)
ConfigurationremoveMemberReplicaForShard in interface Configurationpublic ShardStrategy getStrategyForPrefix(@Nonnull org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier prefix)
ConfigurationgetStrategyForPrefix in interface ConfigurationCopyright © 2018 OpenDaylight. All rights reserved.