Class BindingDOMDataBrokerAdapter
- java.lang.Object
-
- org.opendaylight.controller.md.sal.binding.impl.AbstractForwardedDataBroker
-
- org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter
-
- All Implemented Interfaces:
AutoCloseable
,BindingService
,DataBroker
,DataTreeChangeService
,TransactionFactory
,AsyncDataBroker<InstanceIdentifier<?>,DataObject>
,AsyncDataTransactionFactory<InstanceIdentifier<?>,DataObject>
,TransactionChainFactory<InstanceIdentifier<?>,DataObject>
,BindingAwareService
,Delegator<DOMDataBroker>
@Deprecated(forRemoval=true) public class BindingDOMDataBrokerAdapter extends AbstractForwardedDataBroker implements DataBroker, DataTreeChangeService
Deprecated, for removal: This API element is subject to removal in a future version.The DataBrokerImpl simply defers to the DOMDataBroker for all its operations. All transactions and listener registrations are wrapped by the DataBrokerImpl to allow binding aware components to use the DataBroker transparently.Besides this the DataBrokerImpl and it's collaborators also cache data that is already transformed from the binding independent to binding aware format
-
-
Constructor Summary
Constructors Constructor Description BindingDOMDataBrokerAdapter(DOMDataBroker domDataBroker, BindingToNormalizedNodeCodec codec)
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BindingTransactionChain
createTransactionChain(TransactionChainListener listener)
Deprecated, for removal: This API element is subject to removal in a future version.Create a new transaction chain.ReadOnlyTransaction
newReadOnlyTransaction()
Deprecated, for removal: This API element is subject to removal in a future version.Allocates a new read-only transaction which provides an immutable snapshot of the data tree.ReadWriteTransaction
newReadWriteTransaction()
Deprecated, for removal: This API element is subject to removal in a future version.Allocates new read-write transaction which provides a mutable view of the data tree.WriteTransaction
newWriteOnlyTransaction()
Deprecated, for removal: This API element is subject to removal in a future version.Allocates new write-only transaction based on latest state of data tree.<T extends DataObject,L extends DataTreeChangeListener<T>>
ListenerRegistration<L>registerDataTreeChangeListener(DataTreeIdentifier<T> treeId, L listener)
Deprecated, for removal: This API element is subject to removal in a future version.Registers aDataTreeChangeListener
to receive notifications when data changes under a given path in the conceptual data tree.String
toString()
Deprecated, for removal: This API element is subject to removal in a future version.-
Methods inherited from class org.opendaylight.controller.md.sal.binding.impl.AbstractForwardedDataBroker
close, getCodec, getDelegate, toBinding, toBinding, toBindingData
-
-
-
-
Constructor Detail
-
BindingDOMDataBrokerAdapter
public BindingDOMDataBrokerAdapter(DOMDataBroker domDataBroker, BindingToNormalizedNodeCodec codec)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Detail
-
newReadOnlyTransaction
public ReadOnlyTransaction newReadOnlyTransaction()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AsyncDataTransactionFactory
Allocates a new read-only transaction which provides an immutable snapshot of the data tree.The view of data tree is an immutable snapshot of current data tree state when transaction was allocated.
- Specified by:
newReadOnlyTransaction
in interfaceAsyncDataBroker<InstanceIdentifier<?>,DataObject>
- Specified by:
newReadOnlyTransaction
in interfaceAsyncDataTransactionFactory<InstanceIdentifier<?>,DataObject>
- Specified by:
newReadOnlyTransaction
in interfaceDataBroker
- Specified by:
newReadOnlyTransaction
in interfaceTransactionFactory
- Returns:
- new read-only transaction
-
newReadWriteTransaction
public ReadWriteTransaction newReadWriteTransaction()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AsyncDataTransactionFactory
Allocates new read-write transaction which provides a mutable view of the data tree.Preconditions for mutation of data tree are captured from the snapshot of data tree state, when the transaction is allocated. If data was changed during transaction in an incompatible way then the commit of this transaction will fail. See
AsyncWriteTransaction.submit()
for more details about conflicting and not-conflicting changes and failure scenarios.- Specified by:
newReadWriteTransaction
in interfaceAsyncDataBroker<InstanceIdentifier<?>,DataObject>
- Specified by:
newReadWriteTransaction
in interfaceAsyncDataTransactionFactory<InstanceIdentifier<?>,DataObject>
- Specified by:
newReadWriteTransaction
in interfaceDataBroker
- Specified by:
newReadWriteTransaction
in interfaceTransactionFactory
- Returns:
- new read-write transaction
-
newWriteOnlyTransaction
public WriteTransaction newWriteOnlyTransaction()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AsyncDataTransactionFactory
Allocates new write-only transaction based on latest state of data tree.Preconditions for mutation of data tree are captured from the snapshot of data tree state, when the transaction is allocated. If data was changed during transaction in an incompatible way then the commit of this transaction will fail. See
AsyncWriteTransaction.submit()
for more details about conflicting and not-conflicting changes and failure scenarios.Since this transaction does not provide a view of the data it SHOULD BE used only by callers which are exclusive writers (exporters of data) to the subtree they modify. This prevents optimistic lock failures as described in
AsyncWriteTransaction.submit()
.Exclusivity of writers to particular subtree SHOULD BE enforced by external locking mechanism.
- Specified by:
newWriteOnlyTransaction
in interfaceAsyncDataBroker<InstanceIdentifier<?>,DataObject>
- Specified by:
newWriteOnlyTransaction
in interfaceAsyncDataTransactionFactory<InstanceIdentifier<?>,DataObject>
- Specified by:
newWriteOnlyTransaction
in interfaceDataBroker
- Specified by:
newWriteOnlyTransaction
in interfaceTransactionFactory
- Returns:
- new write-only transaction
-
createTransactionChain
public BindingTransactionChain createTransactionChain(TransactionChainListener listener)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:TransactionChainFactory
Create a new transaction chain. The chain will be initialized to read from its backing datastore, with no outstanding transaction. Listener will be registered to handle chain-level events.- Specified by:
createTransactionChain
in interfaceDataBroker
- Specified by:
createTransactionChain
in interfaceTransactionChainFactory<InstanceIdentifier<?>,DataObject>
- Parameters:
listener
- Transaction chain event listener- Returns:
- A new transaction chain.
-
toString
public String toString()
Deprecated, for removal: This API element is subject to removal in a future version.
-
registerDataTreeChangeListener
public <T extends DataObject,L extends DataTreeChangeListener<T>> ListenerRegistration<L> registerDataTreeChangeListener(DataTreeIdentifier<T> treeId, L listener)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:DataTreeChangeService
Registers aDataTreeChangeListener
to receive notifications when data changes under a given path in the conceptual data tree.You are able to register for notifications for any node or subtree which can be represented using
DataTreeIdentifier
.You are able to register for data change notifications for a subtree or leaf even if it does not exist. You will receive notification once that node is created.
If there is any pre-existing data in the data tree for the path for which you are registering, you will receive an initial data change event, which will contain all pre-existing data, marked as created.
This method returns a
ListenerRegistration
object. To "unregister" your listener for changes call theListenerRegistration.close()
method on the returned object.You MUST explicitly unregister your listener when you no longer want to receive notifications. This is especially true in OSGi environments, where failure to do so during bundle shutdown can lead to stale listeners being still registered.
- Specified by:
registerDataTreeChangeListener
in interfaceDataTreeChangeService
- Parameters:
treeId
- Data tree identifier of the subtree which should be watched for changes.listener
- Listener instance which is being registered- Returns:
- Listener registration object, which may be used to unregister
your listener using
ListenerRegistration.close()
to stop delivery of change events.
-
-