Class AbstractDOMBrokerTransaction<T extends DOMStoreTransaction>
- java.lang.Object
-
- org.opendaylight.controller.cluster.databroker.AbstractDOMBrokerTransaction<T>
-
- All Implemented Interfaces:
DOMDataTreeTransaction
,Identifiable<Object>
- Direct Known Subclasses:
AbstractDOMBrokerWriteTransaction
,DOMBrokerReadOnlyTransaction
public abstract class AbstractDOMBrokerTransaction<T extends DOMStoreTransaction> extends Object implements DOMDataTreeTransaction
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDOMBrokerTransaction(Object identifier, Map<LogicalDatastoreType,? extends DOMStoreTransactionFactory> storeTxFactories)
Creates new composite Transactions.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected MoreObjects.ToStringHelper
addToStringAttributes(MoreObjects.ToStringHelper toStringHelper)
protected void
closeSubtransactions()
protected abstract T
createTransaction(LogicalDatastoreType key)
Object
getIdentifier()
protected T
getSubtransaction(LogicalDatastoreType key)
Returns subtransaction associated with supplied key.protected Collection<T>
getSubtransactions()
Returns immutable Iterable of all subtransactions.protected DOMStoreTransactionFactory
getTxFactory(LogicalDatastoreType type)
String
toString()
-
-
-
Constructor Detail
-
AbstractDOMBrokerTransaction
protected AbstractDOMBrokerTransaction(Object identifier, Map<LogicalDatastoreType,? extends DOMStoreTransactionFactory> storeTxFactories)
Creates new composite Transactions.- Parameters:
identifier
- Identifier of transaction.
-
-
Method Detail
-
getSubtransaction
protected final T getSubtransaction(LogicalDatastoreType key)
Returns subtransaction associated with supplied key.- Parameters:
key
- the data store type key- Returns:
- the subtransaction
- Throws:
NullPointerException
- if key is nullIllegalArgumentException
- if no subtransaction is associated with key.
-
createTransaction
protected abstract T createTransaction(LogicalDatastoreType key)
-
getSubtransactions
protected Collection<T> getSubtransactions()
Returns immutable Iterable of all subtransactions.
-
getIdentifier
public Object getIdentifier()
- Specified by:
getIdentifier
in interfaceIdentifiable<T extends DOMStoreTransaction>
-
closeSubtransactions
protected void closeSubtransactions()
-
getTxFactory
protected DOMStoreTransactionFactory getTxFactory(LogicalDatastoreType type)
-
addToStringAttributes
protected MoreObjects.ToStringHelper addToStringAttributes(MoreObjects.ToStringHelper toStringHelper)
-
-