Class ConfigurationImpl
java.lang.Object
org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl
- All Implemented Interfaces:
Configuration
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationImpl
(String moduleShardsConfigPath, String modulesConfigPath) ConfigurationImpl
(ModuleShardConfigProvider provider) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMemberReplicaForShard
(String shardName, MemberName newMemberName) Adds the given member as the new replica for the given shardName.void
Adds a new configuration for a module and shard.Returns all the configured shard names.getMembersFromShardName
(String shardName) Returns the member replicas for the given shard name.getMemberShardNames
(MemberName memberName) Returns all the shard names that belong on the member by the given name.getModuleNameFromNameSpace
(String nameSpace) Returns the module name for the given namespace name or null if not found.getShardNameForModule
(String moduleName) Returns the first shard name corresponding to the given module name or null if none is configured.getStrategyForModule
(String moduleName) Returns the ShardStrategy for the given module name or null if the module is not found.Returns a unique set of all member names configured for all shards.boolean
isShardConfigured
(String shardName) void
removeMemberReplicaForShard
(String shardName, MemberName newMemberName) Removes the given member as a replica for the given shardName.
-
Constructor Details
-
ConfigurationImpl
-
ConfigurationImpl
-
-
Method Details
-
getMemberShardNames
Description copied from interface:Configuration
Returns all the shard names that belong on the member by the given name.- Specified by:
getMemberShardNames
in interfaceConfiguration
-
getModuleNameFromNameSpace
Description copied from interface:Configuration
Returns the module name for the given namespace name or null if not found.- Specified by:
getModuleNameFromNameSpace
in interfaceConfiguration
-
getStrategyForModule
Description copied from interface:Configuration
Returns the ShardStrategy for the given module name or null if the module is not found.- Specified by:
getStrategyForModule
in interfaceConfiguration
-
getShardNameForModule
Description copied from interface:Configuration
Returns the first shard name corresponding to the given module name or null if none is configured.- Specified by:
getShardNameForModule
in interfaceConfiguration
-
getMembersFromShardName
Description copied from interface:Configuration
Returns the member replicas for the given shard name.- Specified by:
getMembersFromShardName
in interfaceConfiguration
-
getAllShardNames
Description copied from interface:Configuration
Returns all the configured shard names.- Specified by:
getAllShardNames
in interfaceConfiguration
-
getUniqueMemberNamesForAllShards
Description copied from interface:Configuration
Returns a unique set of all member names configured for all shards.- Specified by:
getUniqueMemberNamesForAllShards
in interfaceConfiguration
-
addModuleShardConfiguration
Description copied from interface:Configuration
Adds a new configuration for a module and shard.- Specified by:
addModuleShardConfiguration
in interfaceConfiguration
-
isShardConfigured
- Specified by:
isShardConfigured
in interfaceConfiguration
-
addMemberReplicaForShard
Description copied from interface:Configuration
Adds the given member as the new replica for the given shardName.- Specified by:
addMemberReplicaForShard
in interfaceConfiguration
-
removeMemberReplicaForShard
Description copied from interface:Configuration
Removes the given member as a replica for the given shardName.- Specified by:
removeMemberReplicaForShard
in interfaceConfiguration
-