001package com.hammurapi.store;
002
003public interface TransactionalStore<T, PK, S extends Store<T,PK,S>> extends Store<T, PK, S> {
004        
005        /**
006         * Starts a new transaction.
007         * @param exclusive If true, the transaction acquires write lock on the store when it is created and
008         * releases it when it is committed or rolled back. Otherwise no lock is acquired and individual locks
009         * are acquired by transaction's operations as needed.
010         * @return new transaction.
011         */
012        Transaction<T, PK, S> beginTransaction(boolean exclusive);
013}