public final class BindingDOMDataTreeServiceAdapter extends Object implements DataTreeService
Modifier and Type | Method and Description |
---|---|
static BindingDOMDataTreeServiceAdapter |
create(DOMDataTreeService domService,
BindingToNormalizedNodeCodec codec) |
DataTreeProducer |
createProducer(Collection<DataTreeIdentifier<?>> subtrees)
Create a producer, which is able to access to a set of trees.
|
protected BindingToNormalizedNodeCodec |
getCodec() |
T |
getDelegate() |
<T extends DataTreeListener> |
registerListener(T listener,
Collection<DataTreeIdentifier<?>> subtrees,
boolean allowRxMerges,
Collection<DataTreeProducer> producers)
Register a
DataTreeListener instance. |
public static BindingDOMDataTreeServiceAdapter create(DOMDataTreeService domService, BindingToNormalizedNodeCodec codec)
public DataTreeProducer createProducer(Collection<DataTreeIdentifier<?>> subtrees)
DataTreeProducerFactory
createProducer
in interface DataTreeProducerFactory
subtrees
- The collection of subtrees the resulting producer should have access to.DataTreeProducer
instance.public <T extends DataTreeListener> org.opendaylight.yangtools.concepts.ListenerRegistration<T> registerListener(T listener, Collection<DataTreeIdentifier<?>> subtrees, boolean allowRxMerges, Collection<DataTreeProducer> producers) throws DataTreeLoopException
DataTreeService
DataTreeListener
instance. Once registered, the listener will start
receiving changes on the selected subtrees. If the listener cannot keep up with the rate of
changes, and allowRxMerges is set to true, this service is free to merge the changes, so that
a smaller number of them will be reported, possibly hiding some data transitions (like
flaps).
If the listener wants to write into any producer, that producer has to be mentioned in the call to this method. Those producers will be bound exclusively to the registration, so that accessing them outside of this listener's callback will trigger an error. Any producers mentioned must be idle, e.g. they may not have an open transaction at the time this method is invoked.
Each listener instance can be registered at most once. Implementations of this interface have to guarantee that the listener's methods will not be invoked concurrently from multiple threads.
registerListener
in interface DataTreeService
listener
- DataTreeListener
that is being registeredsubtrees
- Conceptual subtree identifier of subtrees which should be monitored for
changes. May not be null or empty.allowRxMerges
- True if the backend may perform ingress state compression.producers
- DataTreeProducer
instances to bind to the listener.DataTreeLoopException
- if the registration of the listener to the specified subtrees
with specified producers would form a feedback looppublic final T getDelegate()
getDelegate
in interface org.opendaylight.yangtools.concepts.Delegator<T>
protected final BindingToNormalizedNodeCodec getCodec()
Copyright © 2019 OpenDaylight. All rights reserved.