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

com.scalar.db.transaction.consensuscommit.UncommittedRecordException Maven / Gradle / Ivy

Go to download

A universal transaction manager that achieves database-agnostic transactions and distributed transactions that span multiple databases

There is a newer version: 3.14.0
Show newest version
package com.scalar.db.transaction.consensuscommit;

import com.google.common.collect.ImmutableList;
import com.scalar.db.exception.transaction.CrudConflictException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class UncommittedRecordException extends CrudConflictException {
  private final List results;

  public UncommittedRecordException(
      TransactionResult result, String message, String transactionId) {
    this(result, message, null, transactionId);
  }

  public UncommittedRecordException(
      TransactionResult result, String message, Throwable cause, String transactionId) {
    super(message, cause, transactionId);
    results = Collections.singletonList(result);
  }

  public UncommittedRecordException(
      List results, String message, String transactionId) {
    this(results, message, null, transactionId);
  }

  public UncommittedRecordException(
      List results, String message, Throwable cause, String transactionId) {
    super(message, cause, transactionId);
    this.results = new ArrayList<>();
    this.results.addAll(results);
  }

  public List getResults() {
    return ImmutableList.copyOf(results);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy