Skip to content

Commit

Permalink
Merge pull request #43 from caskdata/feature/expose-current-tx
Browse files Browse the repository at this point in the history
TEPHRA-79 Allow access to current transaction
  • Loading branch information
ghelmling committed Mar 12, 2015
2 parents 081a556 + 65f6b36 commit b0aef8b
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.slf4j.LoggerFactory;

import java.util.Collection;
import javax.annotation.Nullable;

/**
* Utility class that encapsulates the transaction life cycle over a given set of
Expand Down Expand Up @@ -86,6 +87,13 @@ public void abort() throws TransactionFailureException {
abort(null);
}

/**
* Returns the current transaction or null if no transaction is currently in progress.
*/
@Nullable
public Transaction getCurrentTransaction() {
return currentTx;
}

// CHECKSTYLE IGNORE "@throws" FOR 11 LINES
/**
Expand Down

0 comments on commit b0aef8b

Please sign in to comment.