Class OSGiDistributedShardedDOMDataTree
- java.lang.Object
-
- org.opendaylight.controller.cluster.sharding.OSGiDistributedShardedDOMDataTree
-
- All Implemented Interfaces:
DistributedShardFactory,DOMDataTreeProducerFactory,DOMDataTreeService,DOMDataTreeShardingService,DOMExtensibleService<DOMDataTreeService,DOMDataTreeServiceExtension>,DOMService
public final class OSGiDistributedShardedDOMDataTree extends Object implements DOMDataTreeService, DOMDataTreeShardingService, DistributedShardFactory
-
-
Constructor Summary
Constructors Constructor Description OSGiDistributedShardedDOMDataTree()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<DistributedShardRegistration>createDistributedShard(DOMDataTreeIdentifier prefix, Collection<MemberName> replicaMembers)Register a new shard that is rooted at the desired prefix with replicas on the provided members.DOMDataTreeProducercreateProducer(Collection<DOMDataTreeIdentifier> subtrees)ClassToInstanceMap<DOMDataTreeServiceExtension>getExtensions()<T extends DOMDataTreeShard>
ListenerRegistration<T>registerDataTreeShard(DOMDataTreeIdentifier prefix, T shard, DOMDataTreeProducer producer)<T extends DOMDataTreeListener>
ListenerRegistration<T>registerListener(T listener, Collection<DOMDataTreeIdentifier> subtrees, boolean allowRxMerges, Collection<DOMDataTreeProducer> producers)
-
-
-
Method Detail
-
createProducer
public DOMDataTreeProducer createProducer(Collection<DOMDataTreeIdentifier> subtrees)
- Specified by:
createProducerin interfaceDOMDataTreeProducerFactory
-
getExtensions
public ClassToInstanceMap<DOMDataTreeServiceExtension> getExtensions()
- Specified by:
getExtensionsin interfaceDOMExtensibleService<DOMDataTreeService,DOMDataTreeServiceExtension>
-
createDistributedShard
public CompletionStage<DistributedShardRegistration> createDistributedShard(DOMDataTreeIdentifier prefix, Collection<MemberName> replicaMembers) throws DOMDataTreeShardingConflictException
Description copied from interface:DistributedShardFactoryRegister a new shard that is rooted at the desired prefix with replicas on the provided members. Note to register a shard without replicas you still need to provide at least one Member for the shard.- Specified by:
createDistributedShardin interfaceDistributedShardFactory- Parameters:
prefix- Shard rootreplicaMembers- Members that this shard is replicated on, has to have at least one Member even if the shard should not be replicated.- Returns:
- A future that will be completed with a DistributedShardRegistration once the backend and frontend shards are spawned.
- Throws:
DOMDataTreeShardingConflictException- If the initial check for a conflict on the local node fails, the sharding configuration won't be updated if this exception is thrown.
-
registerDataTreeShard
public <T extends DOMDataTreeShard> ListenerRegistration<T> registerDataTreeShard(DOMDataTreeIdentifier prefix, T shard, DOMDataTreeProducer producer) throws DOMDataTreeShardingConflictException
- Specified by:
registerDataTreeShardin interfaceDOMDataTreeShardingService- Throws:
DOMDataTreeShardingConflictException
-
registerListener
public <T extends DOMDataTreeListener> ListenerRegistration<T> registerListener(T listener, Collection<DOMDataTreeIdentifier> subtrees, boolean allowRxMerges, Collection<DOMDataTreeProducer> producers) throws DOMDataTreeLoopException
- Specified by:
registerListenerin interfaceDOMDataTreeService- Throws:
DOMDataTreeLoopException
-
-