com.scalar.db.transaction.consensuscommit.SerializableStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalardb Show documentation
Show all versions of scalardb Show documentation
A universal transaction manager that achieves database-agnostic transactions and distributed transactions that span multiple databases
The newest version!
package com.scalar.db.transaction.consensuscommit;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
/**
* A Serializable strategy used in Consensus Commit algorithm. Both strategies basically make
* transactions avoid an anti-dependency that is the root cause of the anomalies in Snapshot
* Isolation.
*/
@SuppressFBWarnings("NM_SAME_SIMPLE_NAME_AS_INTERFACE")
public enum SerializableStrategy implements com.scalar.db.api.SerializableStrategy {
/**
* Extra-write strategy converts all read set into write set when preparing records to remove
* anti-dependencies. As a limitation, it does not support including Scan and Put in a transaction
* because it has to convert records that were read but didn't exist at the time of scan, which is
* not possible only with the current implementation.
*/
EXTRA_WRITE,
/**
* Extra-read strategy checks all read set after preparing records and before committing a state
* to actually find out if there is an anti-dependency.
*/
EXTRA_READ,
}