Software Transactional Memory Implementation for the JVM
Java Groovy Other
Failed to load latest commit information.
multiverse-core-benchmark More work on reporting Apr 7, 2012
multiverse-core Resolved IndexOutOfBoundsException on the FatVariableLengthGammaTxn Aug 28, 2013
multiverse-site Site updates Apr 8, 2012
LICENSE More README fixes Apr 5, 2012
pom.xml Some maven cleanup (added versions + encoding warning fixes) Apr 8, 2012 Disabled some failing test (will be picked up in the future of course) Jan 15, 2012

Multiverse Software Transactional Memory

A software transactional memory implementation for the JVM. Access (read and writes) to shared memory is done through transactional references, that can be compared to the AtomicReferences of Java. Access to these references will be done under A (atomicity), C (consistency), I (isolation) semantics. For more information see


import org.multiverse.api.references.*;
import static org.multiverse.api.StmUtils.*;

public class Account{
    private final TxnRef<Date> lastModified = new TxnRef();
    private final TxnLong amount = new TxnLong();

    public Account(long amount){
       this.lastModified.set(new Date());

    public Date getLastModifiedDate(){
        return lastModified.get();

    public long getAmount(){
        return amount.get();

    public static void transfer(final Account from, final Account to, final long amount){
        atomic(new Runnable()){
            public void run(){
                Date date = new Date();



# And it can be called like this:

Account account1 = new Account(10);
Account account2 = new Account(20)
Account.transfer(account1, account2, 5);

No instrumentation.

Multiverse doesn't rely on instrumentation, so is easy to integrate in existing projects.