Package com.yahoo.omid.tso.messages

Examples of com.yahoo.omid.tso.messages.CommittedTransactionReport


            }
            for (CommitQueryCallback cb : cbs) {
                cb.complete(r.committed);
            }
        } else if (msg instanceof CommittedTransactionReport) {
            CommittedTransactionReport ctr = (CommittedTransactionReport) msg;
            committed.commit(ctr.startTimestamp, ctr.commitTimestamp);
        } else if (msg instanceof CleanedTransactionReport) {
            CleanedTransactionReport r = (CleanedTransactionReport) msg;
            aborted.remove(r.startTimestamp);
        } else if (msg instanceof AbortedTransactionReport) {
View Full Code Here


//      CommitResponse cr3 = (CommitResponse) messageReceived;
//      assertFalse(cr3.committed);
     
      clientHandler.sendMessage(new TimestampRequest());
      // Pending commit report
      CommittedTransactionReport ctr1 = clientHandler.receiveMessage(CommittedTransactionReport.class);
      assertEquals(cr1.startTimestamp, ctr1.startTimestamp);
      assertEquals(cr1.commitTimestamp, ctr1.commitTimestamp);
      // Aborted transaction report
      AbortedTransactionReport atr = clientHandler.receiveMessage(AbortedTransactionReport.class);
      assertEquals(cr2.startTimestamp, atr.startTimestamp);
      // Full Abort report
      CleanedTransactionReport cltr = clientHandler.receiveMessage(CleanedTransactionReport.class);
      assertEquals(cr2.startTimestamp, cltr.startTimestamp);
     
      TimestampResponse tr3 = clientHandler.receiveMessage(TimestampResponse.class);

      clientHandler.sendMessage(new CommitRequest(tr3.timestamp, new RowKey[] { r1, r2 }));
      CommitResponse cr3 = clientHandler.receiveMessage(CommitResponse.class);
      assertTrue(cr3.committed);
      assertEquals(tr3.timestamp, cr3.startTimestamp);

      clientHandler.sendMessage(new TimestampRequest());

      // Pending commit report
      CommittedTransactionReport ctr3 = clientHandler.receiveMessage(CommittedTransactionReport.class);
      assertEquals(cr3.startTimestamp, ctr3.startTimestamp);
      assertEquals(cr3.commitTimestamp, ctr3.commitTimestamp);
     
      TimestampResponse tr4 = clientHandler.receiveMessage(TimestampResponse.class);
View Full Code Here

        }

        lastStartTimestamp = startTimestamp;
        lastCommitTimestamp = commitTimestamp;

        return new CommittedTransactionReport(startTimestamp, commitTimestamp);
    }
View Full Code Here

                break;
            case TSOMessage.CommitQueryResponse:
                msg = new CommitQueryResponse();
                break;
            case TSOMessage.CommittedTransactionReport:
                msg = new CommittedTransactionReport();
                break;
            case TSOMessage.LargestDeletedTimestampReport:
                msg = new LargestDeletedTimestampReport();
                break;
            case TSOMessage.AbortRequest:
View Full Code Here

TOP

Related Classes of com.yahoo.omid.tso.messages.CommittedTransactionReport

Copyright © 2018 www.massapicom. 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.