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
Transaction
begin
in interface Transaction
IllegalStateException
- if transaction is already beganpublic void commit() throws IllegalStateException
Transaction
commit
in interface Transaction
IllegalStateException
- if transaction didn't begin.public int getStatus()
Transaction
getStatus
in interface Transaction
public void rollback() throws IllegalStateException
Transaction
rollback
in interface Transaction
IllegalStateException
- if transaction didn't begin.Copyright © 2013 Hazelcast, Inc.. All rights reserved.