Package com.taobao.metamorphosis.server.transaction.store.TransactionCommands

Examples of com.taobao.metamorphosis.server.transaction.store.TransactionCommands.TransactionOperation.toByteString()


        final TransactionOperation to =
                TransactionOperation.newBuilder().setType(TransactionType.XA_PREPARE)
                .setTransactionId(txid.getTransactionKey()).setWasPrepared(false).build();
        // prepare,����force
        final TxCommand msg =
                TxCommand.newBuilder().setCmdType(TxCommandType.TX_OP).setCmdContent(to.toByteString()).setForce(true)
                .build();
        this.journalStore.write(msg, null, tx.location, false);

        synchronized (this.preparedTransactions) {
            this.preparedTransactions.put(txid, tx);
View Full Code Here


                                        .setWasPrepared(wasPrepared) //
                                        .setDataLength(attachmentLen) // ���ø������ݳ���
                                        .build();
                                msg =
                                        TxCommand.newBuilder().setCmdType(TxCommandType.TX_OP)
                                        .setCmdContent(to.toByteString()).build();
                            }
                            else {
                                final TransactionOperation to = TransactionOperation.newBuilder() //
                                        .setType(TransactionType.LOCAL_COMMIT) //
                                        .setTransactionId(txid.getTransactionKey()) //
View Full Code Here

                                        .setWasPrepared(wasPrepared) //
                                        .setDataLength(attachmentLen)// ���ø������ݳ���
                                        .build();
                                msg =
                                        TxCommand.newBuilder().setCmdType(TxCommandType.TX_OP)
                                        .setCmdContent(to.toByteString()).build();
                            }
                            // ��¼commit��־��������λ����Ϣ
                            try {
                                JournalTransactionStore.this.journalStore.write(msg, localtionBytes, tx.location, true);
                            }
View Full Code Here

                        .setType(TransactionType.XA_ROLLBACK) //
                        .setTransactionId(txid.getTransactionKey()) //
                        .setWasPrepared(false) //
                        .build();
                final TxCommand msg =
                        TxCommand.newBuilder().setCmdType(TxCommandType.TX_OP).setCmdContent(to.toByteString()).build();
                this.journalStore.write(msg, null, tx.location, true);
            }
            else {
                final TransactionOperation to = TransactionOperation.newBuilder() //
                        .setType(TransactionType.LOCAL_ROLLBACK) //
View Full Code Here

                        .setType(TransactionType.LOCAL_ROLLBACK) //
                        .setTransactionId(txid.getTransactionKey()) //
                        .setWasPrepared(false) //
                        .build();
                final TxCommand msg =
                        TxCommand.newBuilder().setCmdType(TxCommandType.TX_OP).setCmdContent(to.toByteString()).build();
                this.journalStore.write(msg, null, tx.location, true);
            }
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.