public class ModuleShardStrategy extends Object implements ShardStrategy
Constructor and Description |
---|
ModuleShardStrategy(String moduleName,
Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
String |
findShard(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
Find the name of the shard in which the data pointed to by the specified path belongs in.
|
org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier |
getPrefixForPath(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
Get the prefix of the shard that contains the data pointed to by the specified path.
|
public static final String NAME
public ModuleShardStrategy(String moduleName, Configuration configuration)
public String findShard(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
ShardStrategy
Should return the name of the default shard DefaultShardStrategy.DEFAULT_SHARD if no matching shard was found
findShard
in interface ShardStrategy
path
- the location of the data in the logical treepublic org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier getPrefixForPath(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
ShardStrategy
getPrefixForPath
in interface ShardStrategy
path
- the location of the data in the logical tree.Copyright © 2019 OpenDaylight. All rights reserved.