tephra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anew <...@git.apache.org>
Subject [GitHub] incubator-tephra pull request #47: [TEPHRA-240] Include conflicting key and ...
Date Tue, 12 Sep 2017 18:52:15 GMT
Github user anew commented on a diff in the pull request:

    https://github.com/apache/incubator-tephra/pull/47#discussion_r138435693
  
    --- Diff: tephra-api/src/main/java/org/apache/tephra/TransactionConflictException.java
---
    @@ -22,11 +22,50 @@
      * Thrown to indicate transaction conflict occurred when trying to commit a transaction.
      */
     public class TransactionConflictException extends TransactionFailureException {
    +
    +  /**
    +   * @deprecated since 0.13-incubating. Use {@link #TransactionConflictException(long,
String, String)} instead.
    +   */
    +  @Deprecated
       public TransactionConflictException(String message) {
         super(message);
    +    transactionId = null;
    +    conflictingChange = null;
    +    conflictingClient = null;
       }
     
    +  /**
    +   * @deprecated since 0.13-incubating. Use {@link #TransactionConflictException(long,
String, String)} instead.
    +   */
    +  @Deprecated
       public TransactionConflictException(String message, Throwable cause) {
         super(message, cause);
    +    transactionId = null;
    +    conflictingChange = null;
    +    conflictingClient = null;
    +  }
    +
    +  public TransactionConflictException(long transactionId, String conflictingChange, String
conflictingClient) {
    +    super(String.format("Transaction %d conflicts with %s on change key '%s'", transactionId,
    +                        conflictingClient == null ? "unknown client" : conflictingClient,
conflictingChange));
    +    this.transactionId = transactionId;
    +    this.conflictingChange = conflictingChange;
    +    this.conflictingClient = conflictingClient;
    +  }
    +
    +  private final Long transactionId;
    --- End diff --
    
    ehm, yes, must be by accident


---

Mime
View raw message