Examples of StartTxnMessage


Examples of edu.brown.hstore.internal.StartTxnMessage

    // INTERNAL MESSAGES
    // ----------------------------------------------------------------------------
   
    public final StartTxnMessage getStartTxnMessage() {
        if (this.start_msg == null) {
            this.start_msg = new StartTxnMessage(this);
        }
        return (this.start_msg);
    }
View Full Code Here

Examples of edu.brown.hstore.internal.StartTxnMessage

        while ((msg = this.work_queue.poll()) != null) {
            // -------------------------------
            // StartTxnMessage
            // -------------------------------
            if (msg instanceof StartTxnMessage) {
                StartTxnMessage startMsg = (StartTxnMessage)msg;
                hstore_site.transactionReject((LocalTransaction)startMsg.getTransaction(), Status.ABORT_REJECT);
            }
            // -------------------------------
            // Things to keep
            // -------------------------------
            else {
View Full Code Here

Examples of edu.brown.hstore.internal.StartTxnMessage

                LOG.warn(String.format("%s - Not queuing txn at partition %d because current mode is %s",
                         ts, this.partitionId, this.currentExecMode));
            return (false);
        }
       
        StartTxnMessage work = ts.getStartTxnMessage();
        if (debug.val)
            LOG.debug(String.format("Queuing %s for '%s' request on partition %d " +
                      "[currentDtxn=%s, queueSize=%d, mode=%s]",
                      work.getClass().getSimpleName(), ts.getProcedure().getName(), this.partitionId,
                      this.currentDtxn, this.work_queue.size(), this.currentExecMode));
        boolean success = this.work_queue.offer(work); // , force);
        if (debug.val && force && success == false) {
            String msg = String.format("Failed to add %s even though force flag was true!", ts);
            throw new ServerFaultException(msg, ts.getTransactionId());
View Full Code Here

Examples of edu.brown.hstore.internal.StartTxnMessage

                          work, work.getTransaction(), this.partitionId);
        this.currentBlockedTxns.add(work);
    }
   
    private void blockTransaction(LocalTransaction ts) {
        this.blockTransaction(new StartTxnMessage(ts));
    }
View Full Code Here

Examples of edu.brown.hstore.internal.StartTxnMessage

        this.ts1 = new LocalTransaction(this.hstore_site);
        this.ts1.testInit(NEXT_TXN_ID++, BASE_PARTITION, null, new PartitionSet(BASE_PARTITION), catalog_proc);
       
        // Initialize some messages that we can use
        this.utilMsg = new UtilityWorkMessage();
        this.startMsg = new StartTxnMessage(ts1);
        this.workMsg = new WorkFragmentMessage(ts1, mockFragment);
    }
View Full Code Here

Examples of edu.brown.hstore.internal.StartTxnMessage

   
    /**
     * testTransactionIdOrder
     */
    public void testTransactionIdOrder() throws Exception {
        StartTxnMessage start0 = new StartTxnMessage(ts1);
        StartTxnMessage start1 = new StartTxnMessage(ts0);
        assert(start1.getTransactionId() < start0.getTransactionId());
       
        // We'll add the our messages and make sure that we get the one with the
        // smaller txnId back first
        boolean ret;
        ret = this.queue.add(start0);
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.