|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.farrago.catalog.FarragoReposTxnContext
net.sf.farrago.session.mock.MockReposTxnContext
public class MockReposTxnContext
MockReposTxnContext overrides FarragoReposTxnContext so that no FarragoRepos
implementation is needed. Note that this class does not actually create any
transaction or lock. See MockSessionStmtValidator.
| Field Summary | |
|---|---|
private boolean |
isRead
|
private boolean |
isWrite
|
private boolean |
locked
|
| Constructor Summary | |
|---|---|
MockReposTxnContext()
|
|
| Method Summary | |
|---|---|
void |
beginLockedTxn(boolean readOnly)
Acquires a repository lock and begins a matching MDR transaction (shared lock for read, or exclusive lock for write). |
void |
beginReadTxn()
Begins a new read-only transaction. |
void |
beginWriteTxn()
Begins a new read/write transaction. |
void |
commit()
Commits the active transaction, if any. |
boolean |
isReadTxnInProgress()
|
boolean |
isTxnInProgress()
|
void |
rollback()
Rolls back the active transaction, if any. |
void |
unlockAfterTxn()
Releases lock acquired by beginLockedTxn. |
| Methods inherited from class net.sf.farrago.catalog.FarragoReposTxnContext |
|---|
beginExclusiveAccess, endExclusiveAccess, setReposReadOnly |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean isRead
private boolean isWrite
private boolean locked
| Constructor Detail |
|---|
public MockReposTxnContext()
| Method Detail |
|---|
public void beginReadTxn()
FarragoReposTxnContext
beginReadTxn in class FarragoReposTxnContextpublic void beginWriteTxn()
FarragoReposTxnContext
beginWriteTxn in class FarragoReposTxnContextpublic void commit()
FarragoReposTxnContext
commit in class FarragoReposTxnContextpublic boolean isReadTxnInProgress()
isReadTxnInProgress in class FarragoReposTxnContextpublic boolean isTxnInProgress()
isTxnInProgress in class FarragoReposTxnContextpublic void rollback()
FarragoReposTxnContext
rollback in class FarragoReposTxnContextpublic void beginLockedTxn(boolean readOnly)
FarragoReposTxnContext
beginLockedTxn in class FarragoReposTxnContextreadOnly - if true, a shared lock is acquired on the catalog;
otherwise, an exclusive lock is acquiredpublic void unlockAfterTxn()
FarragoReposTxnContext
unlockAfterTxn in class FarragoReposTxnContext
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||