Examples of Tx


Examples of ca.uhn.hl7v2.model.v25.datatype.TX

        // The first OBX has a value type of TX. So first, we populate OBX-2 with "TX"...
        obx.getValueType().setValue("TX");
       
        // ... then we create a CE instance to put in OBX-5.
        TX tx = new TX(message);
        tx.setValue("MICROSCOPIC EXAM SHOWS HISTOLOGICALLY NORMAL GALLBLADDER TISSUE");
        value = obx.getObservationValue(0);
        value.setData(tx);

        // Print the message (remember, the MSH segment was not fully or correctly populated)
        System.out.append(new PipeParser().encode(message));
View Full Code Here

Examples of ca.uhn.hl7v2.model.v25.datatype.TX

        // The first OBX has a value type of TX. So first, we populate OBX-2 with "TX"...
        obx.getValueType().setValue("TX");
       
        // ... then we create a CE instance to put in OBX-5.
        TX tx = new TX(message);
        tx.setValue("MICROSCOPIC EXAM SHOWS HISTOLOGICALLY NORMAL GALLBLADDER TISSUE");
        value = obx.getObservationValue(0);
        value.setData(tx);

        // Print the message (remember, the MSH segment was not fully or correctly populated)
        System.out.append(new PipeParser().encode(message));
View Full Code Here

Examples of com.taobao.metamorphosis.server.transaction.store.JournalTransactionStore.Tx

        final LocalTransactionId xid = new LocalTransactionId("test", 1);
        final MessageStore store = this.messageStoreManager.getOrCreateMessageStore("topic1", 2);
        this.transactionStore.addMessage(store, 1, new PutCommand("topic1", 2, "msg1".getBytes(), xid, 0, 1), null);
        this.transactionStore.addMessage(store, 1, new PutCommand("topic1", 2, "msg2".getBytes(), xid, 0, 2), null);

        final Tx tx = this.transactionStore.getInflyTx(xid);
        assertNotNull(tx);
        final PutCommand[] commands = tx.getRequests();
        assertNotNull(commands);
        assertEquals(2, commands.length);
        store.flush();
        // ��û��д��
        assertEquals(0, store.getSizeInBytes());
View Full Code Here

Examples of com.taobao.metamorphosis.server.transaction.store.JournalTransactionStore.Tx

        store = this.messageStoreManager.getOrCreateMessageStore("topic1", 2);
        // ȷ����Ϣû��д��
        assertEquals(0, store.getSizeInBytes());

        // ȷ��TX������
        final Tx tx1 = this.transactionStore.getInflyTx(xid1);
        assertNotNull(tx1);
        PutCommand[] commands = tx1.getRequests();
        assertNotNull(commands);
        assertEquals(2, commands.length);

        final Tx tx2 = this.transactionStore.getInflyTx(xid2);
        assertNotNull(tx2);
        commands = tx2.getRequests();
        assertNotNull(commands);
        assertEquals(1, commands.length);

        // recover�󣬶��ع���
        this.transactionStore.recover(null);
View Full Code Here

Examples of com.taobao.metamorphosis.server.transaction.store.JournalTransactionStore.Tx

        final LocalTransactionId xid = new LocalTransactionId("test", 1);
        MessageStore store = this.messageStoreManager.getOrCreateMessageStore("topic1", 2);
        this.transactionStore.addMessage(store, 1, new PutCommand("topic1", 2, "msg1".getBytes(), xid, 0, 1), null);
        this.transactionStore.addMessage(store, 1, new PutCommand("topic1", 2, "msg2".getBytes(), xid, 0, 2), null);

        final Tx tx = this.transactionStore.getInflyTx(xid);
        assertNotNull(tx);
        final PutCommand[] commands = tx.getRequests();
        assertNotNull(commands);
        assertEquals(2, commands.length);
        store.flush();
        // ��û��д��
        assertEquals(0, store.getSizeInBytes());
View Full Code Here

Examples of com.taobao.metamorphosis.server.transaction.store.JournalTransactionStore.Tx

        assertEquals(0, store.getSizeInBytes());
        assertNull(this.transactionStore.getInflyTx(xid));
        // ��Ȼ����prepare״̬
        assertNotNull(this.transactionStore.getPreparedTx(xid));
        // ȷ�ϲ�������
        final Tx tx = this.transactionStore.getPreparedTx(xid);
        assertNotNull(tx);
        final PutCommand[] commands = tx.getRequests();
        assertNotNull(commands);
        assertEquals(2, commands.length);
        for (final PutCommand cmd : commands) {
            assertTrue(cmd.equals(cmd1) || cmd.equals(cmd2));
        }
View Full Code Here

Examples of com.taobao.metamorphosis.server.transaction.store.JournalTransactionStore.Tx

            null);
        this.transactionStore.commit(xid3, false);

        // ����checkpoint��Ӧ��Ϊ����1
        final JournalLocation location = this.transactionStore.checkpoint();
        final Tx tx = this.transactionStore.getInflyTx(xid1);
        assertEquals(location, tx.getLocation());
    }
View Full Code Here

Examples of com.taobao.metamorphosis.server.transaction.store.JournalTransactionStore.Tx

            case XA_PREPARE:
                this.transactionStore.replayPrepare(xid);
                break;
            case XA_COMMIT:
            case LOCAL_COMMIT:
                final Tx tx = this.transactionStore.replayCommit(xid, command.getWasPrepared());
                if (tx == null) {
                    break;
                }
                if (tx.getOperations().isEmpty()) {
                    break;
                }

                final Map<MessageStore, List<Long>> ids = tx.getMsgIds();
                final Map<MessageStore, List<PutCommand>> putCmds = tx.getPutCommands();
                // ��ȡ�������ݣ������Ϣ��λ����Ϣ
                final int attachmentLen = command.getDataLength();
                final ByteBuffer buf = ByteBuffer.allocate(attachmentLen);
                // �������ݵ�����λ�ã���㣫4���ֽڵ�cmd���ȣ�cmd������
                final long dataOffset = 4 + offset + cmdBufLen;
View Full Code Here

Examples of hirondelle.web4j.database.Tx

   Add all <tt>aUnknowns</tt> to the <tt>UnknownBaseText</tt> table.
  
    <P>This is an all or none operation.
  */
  public int addAll(Set<String> aUnknowns) throws DAOException {
    Tx addTx = new AddAllUnknowns(aUnknowns);
    return addTx.executeTx();
  }
View Full Code Here

Examples of hirondelle.web4j.database.Tx

   Move the given unknown to the <tt>BaseText</tt> table.
  */
  boolean move(BaseText aUnknownBaseText) throws DAOException {
    SqlId[] sqlIds = {BaseTextAction.BASE_TEXT_ADD, UnknownBaseTextEdit.DELETE};
    Object[] params = {aUnknownBaseText.getBaseText(), aUnknownBaseText.getIsCoderKey(), aUnknownBaseText.getBaseText()};
    Tx move = new TxSimple(sqlIds, params);
    return Util.isSuccess(move.executeTx());
  }
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.