Interface ITransactionSPI

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable, ITransaction, ITransaction
    All Known Implementing Classes:
    TransactionHibernate

    public interface ITransactionSPI
    extends ITransaction
    The transaction interface used internally by the portal framework. ITransaction implementations must also implement this interface.
    Since:
    4.2.0
    Version:
    $Revision$ $Date$
    • Method Detail

      • setTransactionProviderCallback

        void setTransactionProviderCallback​(ITransactionProviderCallback callback)
        Sets the transaction provider callback object to be used by this transaction.
        Parameters:
        callback - the callback object.
        Since:
        4.2.0
      • getTransactionCreationTrace

        java.lang.Throwable getTransactionCreationTrace()
        Returns a throwable used just as a trace to the transaction creation. Instead of manually manipulating StackTraceElement, using a throwable also provides higher-level methods.
        Since:
        6.1.0
        See Also:
        Throwable.getStackTrace()
      • getCreationTimeMillis

        long getCreationTimeMillis()
        Returns the time this transaction object was created.
        Returns:
        the difference, measured in milliseconds, between this object creation time and midnight, January 1, 1970 UTC.
        Since:
        6.2.0
      • getBeginTimeMillis

        long getBeginTimeMillis()
        Returns the time when this transaction began in milliseconds since January 1, 1970 UTC.
        Returns:
        the time when this transaction began in milliseconds since January 1, 1970 UTC.
        Throws:
        java.lang.IllegalStateException - if the transaction never began.
        Since:
        10.3.0
      • addObserverFirst

        boolean addObserverFirst​(ITransactionObserver observer)
                          throws PortalException
        Adds an observer for this transaction as the first observer in the observer list. The observer is added only if the current observer list does not already contain it.
        Parameters:
        observer - the observer.
        Returns:
        true if the observer was added, false otherwise.
        Throws:
        PortalException
        Since:
        14.0.0