How to Use Prevayler

PrevaylerSample.java

import org.prevayler.Prevayler;
import org.prevayler.PrevaylerFactory;

import java.io.IOException;
import java.util.ArrayList;

public final class PrevaylerSample {

  public static void main(final String[] args) throws Exception {
    final Prevayler prevayler = PrevaylerFactory.createPrevayler(new ArrayList<String>());

    prevayler.execute(new SampleTransaction());

    prevayler.takeSnapshot();

    prevayler.close();
  }

}

SampleTransaction.java

import org.prevayler.Transaction;

import java.util.Date;

public final class AddTransaction implements Transaction {

  public void executeOn(final Object prevalentSystem, final Date executionTime) {
  }

}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s