org.multiverse.api
Interface TransactionFactory<T extends Transaction>

Type Parameters:
T -

public interface TransactionFactory<T extends Transaction>

A Factory responsible for creating a Transaction. To set properties for Transactions you need to look at the TransactionFactoryBuilder.

A TransactionFactory is thread-safe and it is expected to be shared between threads (doesn't impose it, but it is the most logical use case). It also is expected to be re-used instead of recreated.


Method Summary
 T create()
          Creates a new unstarted Transaction.
 Stm getStm()
          Returns the Stm this TransactionFactory belongs to.
 TransactionConfiguration getTransactionConfiguration()
           
 TransactionFactoryBuilder getTransactionFactoryBuilder()
          Returns the TransactionFactoryBuilder that created this TransactionFactory.
 T start()
          Creates a new and started Transaction.
 

Method Detail

getTransactionConfiguration

TransactionConfiguration getTransactionConfiguration()

getTransactionFactoryBuilder

TransactionFactoryBuilder getTransactionFactoryBuilder()
Returns the TransactionFactoryBuilder that created this TransactionFactory.

Returns:
the TransactionFactoryBuilder that created this TransactionFactory.

getStm

Stm getStm()
Returns the Stm this TransactionFactory belongs to.

Returns:
the Stm this TransactionFactory belongs to.

create

T create()
Creates a new unstarted Transaction.

Returns:
the created Transaction.
Throws:
TransactionCreateFailureException - if creating a new transaction failed.

start

T start()
Creates a new and started Transaction.

Returns:
the created Transaction
Throws:
TransactionCreateFailureException - if starting a new transaction failed.


Copyright © 2008-2010 Multiverse. All Rights Reserved.