com.hazelcast.transaction.impl
Class TransactionImpl

java.lang.Object
  extended by com.hazelcast.transaction.impl.TransactionImpl
All Implemented Interfaces:
Transaction, TransactionSupport

public class TransactionImpl
extends Object
implements Transaction, TransactionSupport


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.hazelcast.transaction.impl.Transaction
Transaction.State
 
Constructor Summary
TransactionImpl(TransactionManagerServiceImpl transactionManagerService, NodeEngine nodeEngine, TransactionOptions options, String txOwnerUuid)
           
 
Method Summary
 void addTransactionLog(TransactionLog transactionLog)
           
 void begin()
           
 void commit()
           
 String getOwnerUuid()
           
 long getStartTime()
           
 Transaction.State getState()
           
 long getTimeoutMillis()
           
 TransactionLog getTransactionLog(Object key)
           
 TransactionOptions.TransactionType getTransactionType()
           
 List<TransactionLog> getTxLogs()
           
 String getTxnId()
           
 void prepare()
           
 void removeTransactionLog(Object key)
           
 void rollback()
           
 boolean setTimeoutMillis(long timeoutMillis)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransactionImpl

public TransactionImpl(TransactionManagerServiceImpl transactionManagerService,
                       NodeEngine nodeEngine,
                       TransactionOptions options,
                       String txOwnerUuid)
Method Detail

getTxnId

public String getTxnId()
Specified by:
getTxnId in interface Transaction
Specified by:
getTxnId in interface TransactionSupport

getTransactionType

public TransactionOptions.TransactionType getTransactionType()

addTransactionLog

public void addTransactionLog(TransactionLog transactionLog)
Specified by:
addTransactionLog in interface TransactionSupport

getTransactionLog

public TransactionLog getTransactionLog(Object key)
Specified by:
getTransactionLog in interface TransactionSupport

getTxLogs

public List<TransactionLog> getTxLogs()

removeTransactionLog

public void removeTransactionLog(Object key)
Specified by:
removeTransactionLog in interface TransactionSupport

begin

public void begin()
           throws IllegalStateException
Specified by:
begin in interface Transaction
Throws:
IllegalStateException

prepare

public void prepare()
             throws TransactionException
Specified by:
prepare in interface Transaction
Throws:
TransactionException

commit

public void commit()
            throws TransactionException,
                   IllegalStateException
Specified by:
commit in interface Transaction
Throws:
TransactionException
IllegalStateException

rollback

public void rollback()
              throws IllegalStateException
Specified by:
rollback in interface Transaction
Throws:
IllegalStateException

getStartTime

public long getStartTime()

getOwnerUuid

public String getOwnerUuid()
Specified by:
getOwnerUuid in interface TransactionSupport

getState

public Transaction.State getState()
Specified by:
getState in interface Transaction
Specified by:
getState in interface TransactionSupport

getTimeoutMillis

public long getTimeoutMillis()
Specified by:
getTimeoutMillis in interface Transaction
Specified by:
getTimeoutMillis in interface TransactionSupport

setTimeoutMillis

public boolean setTimeoutMillis(long timeoutMillis)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.