package com.hammurapi.store;

public interface TransactionalStore<T, PK, S extends Store<T,PK,S>> extends Store<T, PK, S> {
	
	/**
	 * Starts a new transaction.
	 * @param exclusive If true, the transaction acquires write lock on the store when it is created and
	 * releases it when it is committed or rolled back. Otherwise no lock is acquired and individual locks
	 * are acquired by transaction's operations as needed.
	 * @return new transaction.
	 */
	Transaction<T, PK, S> beginTransaction(boolean exclusive);
}
