Skip to content

Commit

Permalink
More Txn renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
pveentjer committed Apr 6, 2012
1 parent a9859b1 commit 672a21d
Show file tree
Hide file tree
Showing 80 changed files with 190 additions and 189 deletions.
2 changes: 1 addition & 1 deletion multiverse-core/src/main/java/org/multiverse/api/Txn.java
Expand Up @@ -54,7 +54,7 @@ public interface Txn {
*
* @return the TxnConfig.
*/
TxnConfig getConfiguration();
TxnConfig getConfig();

/**
* Returns the status of this Txn.
Expand Down
Expand Up @@ -20,7 +20,7 @@ public interface TxnFactory {
*
* @return the TxnConfig.
*/
TxnConfig getConfiguration();
TxnConfig getConfig();

TxnFactoryBuilder getTransactionFactoryBuilder();

Expand Down
Expand Up @@ -24,7 +24,7 @@ public interface TxnFactoryBuilder {
*
* @return the used TxnConfig.
*/
TxnConfig getConfiguration();
TxnConfig getConfig();

/**
* Sets if the {@link org.multiverse.api.exceptions.ControlFlowError} is reused. Normally you don't want to reuse them
Expand Down
Expand Up @@ -475,7 +475,7 @@ protected final void finish(final Txn tx) {
tx.abort();
throw new IllegalStateException(
format("[%s] Didn't expect to encounter an aborted CommitBarrier",
tx.getConfiguration().getFamilyName()));
tx.getConfig().getFamilyName()));
}
}

Expand All @@ -498,7 +498,7 @@ protected static void ensureNotDead(final Txn tx, final String operation) {
if (!tx.getStatus().isAlive()) {
throw new DeadTxnException(
format("[%s] Txn can't be used for %s since it isn't alive",
tx.getConfiguration().getFamilyName(), operation)
tx.getConfig().getFamilyName(), operation)
);
}
}
Expand Down Expand Up @@ -547,11 +547,11 @@ public void joinCommit(final Txn tx) throws InterruptedException {
break;
case Committed:
String committedMsg = format("Can't await commit on already committed VetoCommitBarrier " +
"with transaction %s", tx.getConfiguration().getFamilyName());
"with transaction %s", tx.getConfig().getFamilyName());
throw new CommitBarrierOpenException(committedMsg);
case Aborted:
String abortMsg = format("Can't await commit on already aborted VetoCommitBarrier " +
"with transaction %s", tx.getConfiguration().getFamilyName());
"with transaction %s", tx.getConfig().getFamilyName());
throw new CommitBarrierOpenException(abortMsg);
default:
throw new IllegalStateException();
Expand Down Expand Up @@ -602,13 +602,13 @@ public void joinCommitUninterruptibly(final Txn tx) {
tx.abort();

String abortedMsg = format("Can't call joinCommitUninterruptible on already aborted " +
"CountDownCommitBarrier with transaction %s ", tx.getConfiguration().getFamilyName());
"CountDownCommitBarrier with transaction %s ", tx.getConfig().getFamilyName());
throw new CommitBarrierOpenException(abortedMsg);
case Committed:
tx.abort();

String commitMsg = format("Can't call joinCommitUninterruptible on already committed " +
"CountDownCommitBarrier with transaction %s ", tx.getConfiguration().getFamilyName());
"CountDownCommitBarrier with transaction %s ", tx.getConfig().getFamilyName());
throw new CommitBarrierOpenException(commitMsg);
default:
throw new IllegalStateException();
Expand Down Expand Up @@ -653,11 +653,11 @@ public boolean tryJoinCommit(final Txn tx) {
break;
case Aborted:
String abortMsg = format("[%s] Can't call tryJoinCommit on already aborted " +
"CountDownCommitBarrier", tx.getConfiguration().getFamilyName());
"CountDownCommitBarrier", tx.getConfig().getFamilyName());
throw new CommitBarrierOpenException(abortMsg);
case Committed:
String commitMsg = format("[%s] Can't call tryJoinCommit on already committed " +
"CountDownCommitBarrier", tx.getConfiguration().getFamilyName());
"CountDownCommitBarrier", tx.getConfig().getFamilyName());
throw new CommitBarrierOpenException(commitMsg);
default:
throw new IllegalStateException();
Expand Down
Expand Up @@ -196,11 +196,11 @@ public void incParties(Txn tx, int extra) {
tx.abort();
throw new PreparedTxnException(
format("[%s] Can't call incParties on non active transaction because it is %s",
tx.getConfiguration().getFamilyName(), tx.getStatus()));
tx.getConfig().getFamilyName(), tx.getStatus()));
} else {
throw new DeadTxnException(
format("[%s] Can't call incParties on non active transaction because it is %s",
tx.getConfiguration().getFamilyName(), tx.getStatus()));
tx.getConfig().getFamilyName(), tx.getStatus()));
}

}
Expand All @@ -222,11 +222,11 @@ public void incParties(Txn tx, int extra) {
break;
case Aborted:
String abortMsg = format("[%s] Can't call incParties on already aborted CountDownCommitBarrier",
tx.getConfiguration().getFamilyName());
tx.getConfig().getFamilyName());
throw new CommitBarrierOpenException(abortMsg);
case Committed:
String commitMsg = format("[%s] Can't call incParties on already committed CountDownCommitBarrier",
tx.getConfiguration().getFamilyName());
tx.getConfig().getFamilyName());
throw new CommitBarrierOpenException(commitMsg);
default:
throw new IllegalStateException();
Expand Down
Expand Up @@ -109,12 +109,12 @@ public void vetoCommit(Txn tx) {
case Aborted:
String abortMsg = format(
"[%s] Can't veto commit on already aborted VetoCommitBarrier",
tx.getConfiguration().getFamilyName());
tx.getConfig().getFamilyName());
throw new CommitBarrierOpenException(abortMsg);
case Committed:
String commitMsg = format(
"[%s] Can't veto commit on already committed VetoCommitBarrier",
tx.getConfiguration().getFamilyName());
tx.getConfig().getFamilyName());
throw new CommitBarrierOpenException(commitMsg);
default:
throw new IllegalStateException();
Expand Down
Expand Up @@ -19,7 +19,7 @@ public AbstractGammaTxnExecutor(final GammaTxnFactory txnFactory) {
throw new NullPointerException();
}
this.txnFactory = txnFactory;
this.txnConfig = txnFactory.getConfiguration();
this.txnConfig = txnFactory.getConfig();
this.backoffPolicy = txnConfig.backoffPolicy;
}
}

0 comments on commit 672a21d

Please sign in to comment.