public class TransactionClientProxy extends Object implements Transaction
TXN_STATUS_ACTIVE, TXN_STATUS_COMMITTED, TXN_STATUS_COMMITTING, TXN_STATUS_NO_TXN, TXN_STATUS_PREPARED, TXN_STATUS_PREPARING, TXN_STATUS_ROLLED_BACK, TXN_STATUS_ROLLING_BACK, TXN_STATUS_UNKNOWN| Constructor and Description |
|---|
TransactionClientProxy(String name,
HazelcastClient client) |
| Modifier and Type | Method and Description |
|---|---|
void |
begin()
Creates a new transaction and associate it with the current thread.
|
void |
commit()
Commits the transaction associated with the current thread.
|
int |
getStatus()
Returns the status of the transaction associated with the current thread.
|
void |
rollback()
Rolls back the transaction associated with the current thread.
|
public TransactionClientProxy(String name, HazelcastClient client)
public void begin()
throws IllegalStateException
Transactionbegin in interface TransactionIllegalStateException - if transaction is already beganpublic void commit()
throws IllegalStateException
Transactioncommit in interface TransactionIllegalStateException - if transaction didn't begin.public int getStatus()
TransactiongetStatus in interface Transactionpublic void rollback()
throws IllegalStateException
Transactionrollback in interface TransactionIllegalStateException - if transaction didn't begin.Copyright © 2013 Hazelcast, Inc.. All rights reserved.