Search in sources :

Example 1 with XATransactionDTO

use of com.hazelcast.transaction.impl.xa.XATransactionDTO in project hazelcast by hazelcast.

the class XaReplicationOperation method run.

@Override
public void run() throws Exception {
    XAService xaService = getService();
    NodeEngine nodeEngine = getNodeEngine();
    for (XATransactionDTO transactionDTO : migrationData) {
        XATransaction transaction = new XATransaction(nodeEngine, transactionDTO.getRecords(), transactionDTO.getTxnId(), transactionDTO.getXid(), transactionDTO.getOwnerUuid(), transactionDTO.getTimeoutMilis(), transactionDTO.getStartTime());
        xaService.putTransaction(transaction);
    }
}
Also used : NodeEngine(com.hazelcast.spi.NodeEngine) XAService(com.hazelcast.transaction.impl.xa.XAService) XATransactionDTO(com.hazelcast.transaction.impl.xa.XATransactionDTO) XATransaction(com.hazelcast.transaction.impl.xa.XATransaction)

Example 2 with XATransactionDTO

use of com.hazelcast.transaction.impl.xa.XATransactionDTO in project hazelcast by hazelcast.

the class XaReplicationOperation method readInternal.

@Override
protected void readInternal(ObjectDataInput in) throws IOException {
    int size = in.readInt();
    migrationData = new ArrayList<XATransactionDTO>(size);
    for (int i = 0; i < size; i++) {
        XATransactionDTO transactionDTO = in.readObject();
        migrationData.add(transactionDTO);
    }
}
Also used : XATransactionDTO(com.hazelcast.transaction.impl.xa.XATransactionDTO)

Aggregations

XATransactionDTO (com.hazelcast.transaction.impl.xa.XATransactionDTO)2 NodeEngine (com.hazelcast.spi.NodeEngine)1 XAService (com.hazelcast.transaction.impl.xa.XAService)1 XATransaction (com.hazelcast.transaction.impl.xa.XATransaction)1