Skip to content

Commit

Permalink
Reintroducing the 'origin' field of a transaction. It is used by the …
Browse files Browse the repository at this point in the history
…Replication extension only;

For now I'd like to restore it; I'd propose to mark it deprecated and find a better way ASAP. We can't throw it away right now :-(
  • Loading branch information
dizzzz committed Jun 16, 2016
1 parent 0ff6686 commit af4b348
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/org/exist/storage/txn/Txn.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public enum State { STARTED, ABORTED, COMMITTED, CLOSED }
private final TransactionManager tm;
private final long id;
private State state;
private String originId;

private List<LockInfo> locksHeld = new ArrayList<>();
private List<TxnListener> listeners = new ArrayList<>();
Expand Down Expand Up @@ -128,5 +129,26 @@ public void abort() {
public void close() {
tm.close(this);
}

/**
* Get origin of transaction
* @return Id
*/
@Deprecated
public String getOriginId() {
return originId;
}

/**
* Set origin of transaction. Purpose is to be able to
* see the origin of the transaction.
*
* @param id Identifier of origin, FQN or URI.
*/
@Deprecated
public void setOriginId(String id) {
originId = id;
}

}

0 comments on commit af4b348

Please sign in to comment.