All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.scalar.db.sql.springdata.twopc.TwoPcResult Maven / Gradle / Ivy

package com.scalar.db.sql.springdata.twopc;

import javax.annotation.Nullable;

public class TwoPcResult {

  private final String transactionId;
  @Nullable private final R executionPhaseReturnValue;

  /**
   * A result from {@link ExecutionPhaseOperations} via {@link TwoPcOperationsProcessor#execute}
   *
   * @param transactionId a transaction ID of the global transaction
   * @param executionPhaseReturnValue a return value from execution phase operations. It's null if
   *     nothing to be returned
   */
  TwoPcResult(String transactionId, @Nullable R executionPhaseReturnValue) {
    this.transactionId = transactionId;
    this.executionPhaseReturnValue = executionPhaseReturnValue;
  }

  public String transactionId() {
    return transactionId;
  }

  @Nullable
  public R executionPhaseReturnValue() {
    return executionPhaseReturnValue;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy