public interface TransactionalCodecTemplate
void commit(String transactionId, long threadId)
transactionId
- The internal Hazelcast transaction id.threadId
- The thread id for the transaction.Object create(long timeout, int durability, int transactionType, long threadId)
timeout
- The maximum allowed duration for the transaction operations.durability
- The durability of the transactiontransactionType
- Identifies the type of the transaction. Possible values are:
1 (Two phase): The two phase commit is more than the classic two phase commit (if you want a regular
two phase commit, use local). Before it commits, it copies the commit-log to other members, so in
case of member failure, another member can complete the commit.
2 (Local): Unlike the name suggests, local is a two phase commit. So first all cohorts are asked
to prepare if everyone agrees then all cohorts are asked to commit. The problem happens when during
the commit phase one or more members crash, that the system could be left in an inconsistent state.threadId
- The thread id for the transaction.void rollback(String transactionId, long threadId)
transactionId
- The internal Hazelcast transaction id.threadId
- The thread id for the transaction.Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.