Package lumis.portal.transaction.spi
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addObserverFirst(ITransactionObserver observer)
Adds an observer for this transaction as the first observer in the observer list.long
getBeginTimeMillis()
Returns the time when this transaction began in milliseconds since January 1, 1970 UTC.long
getCreationTimeMillis()
Returns the time this transaction object was created.java.lang.Throwable
getTransactionCreationTrace()
Returns a throwable used just as a trace to the transaction creation.void
setTransactionProviderCallback(ITransactionProviderCallback callback)
Sets the transaction provider callback object to be used by this transaction.-
Methods inherited from interface lumis.portal.transaction.ITransaction
getByConnectionId
-
Methods inherited from interface lumis.util.ITransaction
addObserver, begin, close, commit, dispose, getAttribute, isActive, removeAttribute, removeObserver, rollback, setAttribute
-
-
-
-
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 manipulatingStackTraceElement
, 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
-
-