public class TransactionImpl extends Object implements Transaction
Transaction.State| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_TIMEOUT |
static String |
TIMEOUT_SYSTEM_PROPERTY |
| Constructor and Description |
|---|
TransactionImpl(javax.jcr.Session session,
String userName)
Create a transaction for the given Session
|
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
"Commit" the transaction by saving the backing-session
|
void |
expire()
End the session, and mark for reaping
|
Date |
getCreated()
Get the date this transaction was created
|
Date |
getExpires()
Get the Date when this transaction is expired and can be
garbage-collected
|
String |
getId()
Get the transaction identifier
|
javax.jcr.Session |
getSession()
Get the transaction-aware session
|
Transaction.State |
getState()
Get the state of this transaction
|
boolean |
isAssociatedWithUser(String userName)
Checks if this transaction is associated with a specific user.
|
void |
rollback()
Discard all unpersisted changes and expire
|
void |
updateExpiryDate()
Roll forward the expiration date for recent activity
|
public static final long DEFAULT_TIMEOUT
public static final String TIMEOUT_SYSTEM_PROPERTY
public TransactionImpl(javax.jcr.Session session, String userName)
session - public javax.jcr.Session getSession()
TransactiongetSession in interface Transactionpublic Date getCreated()
TransactiongetCreated in interface Transactionpublic String getId()
TransactiongetId in interface Transactionpublic Transaction.State getState() throws javax.jcr.RepositoryException
TransactiongetState in interface Transactionjavax.jcr.RepositoryExceptionpublic Date getExpires()
TransactiongetExpires in interface Transactionpublic void commit()
Transactioncommit in interface Transactionpublic void expire()
Transactionexpire in interface Transactionpublic boolean isAssociatedWithUser(String userName)
TransactionisAssociatedWithUser in interface TransactionuserName - the userpublic void rollback()
Transactionrollback in interface Transactionpublic void updateExpiryDate()
TransactionupdateExpiryDate in interface TransactionCopyright © 2013-2014 DuraSpace, Inc.. All Rights Reserved.