public class TracingBroker extends Object implements TracingDOMDataBroker
Constructor and Description |
---|
TracingBroker(String type,
DOMDataBroker delegate,
Config config,
BindingNormalizedNodeSerializer codec) |
Modifier and Type | Method and Description |
---|---|
DOMTransactionChain |
createTransactionChain(DOMTransactionChainListener transactionChainListener)
Create a new transaction chain.
|
com.google.common.collect.ClassToInstanceMap<DOMDataBrokerExtension> |
getExtensions()
Return a map of currently-supported extensions, along with accessor services
which provide access to the specific functionality bound to this service.
|
DOMDataTreeReadTransaction |
newReadOnlyTransaction()
Allocates a new read-only transaction which provides an immutable snapshot of the data tree.
|
DOMDataTreeReadWriteTransaction |
newReadWriteTransaction()
Allocates new read-write transaction which provides a mutable view of the data tree.
|
DOMDataTreeWriteTransaction |
newWriteOnlyTransaction()
Allocates new write-only transaction based on latest state of data tree.
|
boolean |
printOpenTransactions(PrintStream ps,
int minOpenTXs)
Prints a human-readable "report" of all opened but not closed transactions,
including transactions chains and transactions opened by them, onto the printStream.
|
void |
watchRegistrations(String iidString,
LogicalDatastoreType store)
Log registrations to this subtree of the md-sal.
|
void |
watchWrites(String iidString,
LogicalDatastoreType store)
Log writes to this subtree of the md-sal.
|
public TracingBroker(String type, DOMDataBroker delegate, Config config, BindingNormalizedNodeSerializer codec)
public void watchRegistrations(String iidString, LogicalDatastoreType store)
iidString
- the iid path of the root of the subtreestore
- Which LogicalDataStore? or null for bothpublic void watchWrites(String iidString, LogicalDatastoreType store)
iidString
- the iid path of the root of the subtreestore
- Which LogicalDataStore? or null for bothpublic DOMDataTreeReadWriteTransaction newReadWriteTransaction()
DOMTransactionFactory
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 DOMDataTreeWriteTransaction.commit()
for more details about conflicting and
non-conflicting changes and failure scenarios.
newReadWriteTransaction
in interface DOMTransactionFactory
public DOMDataTreeWriteTransaction newWriteOnlyTransaction()
DOMTransactionFactory
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 DOMDataTreeWriteTransaction.commit()
for more details about conflicting and
non-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
DOMDataTreeWriteTransaction.commit()
.
Exclusivity of writers to particular subtree SHOULD BE enforced by external locking mechanism.
newWriteOnlyTransaction
in interface DOMTransactionFactory
public DOMTransactionChain createTransactionChain(DOMTransactionChainListener transactionChainListener)
DOMDataBroker
createTransactionChain
in interface DOMDataBroker
transactionChainListener
- Transaction chain event listenerpublic DOMDataTreeReadTransaction newReadOnlyTransaction()
DOMTransactionFactory
newReadOnlyTransaction
in interface DOMTransactionFactory
public com.google.common.collect.ClassToInstanceMap<DOMDataBrokerExtension> getExtensions()
DOMExtensibleService
getExtensions
in interface DOMExtensibleService<DOMDataBroker,DOMDataBrokerExtension>
public boolean printOpenTransactions(PrintStream ps, int minOpenTXs)
TracingDOMDataBroker
printOpenTransactions
in interface TracingDOMDataBroker
minOpenTXs
- minimum open number of transactions (leaks with fewer are not printed)Copyright © 2019 OpenDaylight. All rights reserved.