Class AbstractDOMTransactionFactory<T extends DOMStoreTransactionFactory>

java.lang.Object
org.opendaylight.controller.cluster.databroker.AbstractDOMTransactionFactory<T>
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
AbstractDOMBroker

public abstract class AbstractDOMTransactionFactory<T extends DOMStoreTransactionFactory> extends Object implements AutoCloseable
  • Constructor Details

  • Method Details

    • newTransactionIdentifier

      protected abstract Object newTransactionIdentifier()
      Implementations must return unique identifier for each and every call of this method.
      Returns:
      new Unique transaction identifier.
    • commit

      protected abstract FluentFuture<? extends CommitInfo> commit(DOMDataTreeWriteTransaction transaction, DOMStoreThreePhaseCommitCohort cohort)
      Submits a transaction asynchronously for commit.
      Parameters:
      transaction - the transaction to submit
      cohort - the associated cohort
      Returns:
      a resulting Future
    • newReadOnlyTransaction

      public final DOMDataTreeReadTransaction newReadOnlyTransaction()
      Creates a new read-only transaction.
      Returns:
      the transaction instance
    • newWriteOnlyTransaction

      public final DOMDataTreeWriteTransaction newWriteOnlyTransaction()
      Creates a new write-only transaction.
      Returns:
      the transaction instance
    • newReadWriteTransaction

      public final DOMDataTreeReadWriteTransaction newReadWriteTransaction()
      Creates a new read-write transaction.
      Returns:
      the transaction instance
    • getTxFactories

      public final Map<LogicalDatastoreType,T> getTxFactories()
      Convenience accessor of backing factories intended to be used only by finalization of this class. Note: Finalization of this class may want to access other functionality of supplied Transaction factories.
      Returns:
      Map of backing transaction factories.
    • checkNotClosed

      protected final void checkNotClosed()
      Checks if instance is not closed.
      Throws:
      IllegalStateException - If instance of this class was closed.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable