Package org.apache.bookkeeper.client.QuorumEngine.Operation

Examples of org.apache.bookkeeper.client.QuorumEngine.Operation.ReadOp


            throw BKException.create(Code.ReadException);
       
        RetCounter counter = new RetCounter();
        counter.inc();
       
        Operation r = new ReadOp(lh, firstEntry, lastEntry, this, counter);
        engines.get(lh.getId()).sendOp(r);
        //qeMap.get(lh.getId()).put(r);
        LOG.debug("Going to wait for read entries: " + counter.i);
        counter.block(0);
        LOG.debug("Done with waiting: " + counter.i + ", " + firstEntry);
View Full Code Here


    throws BKException, InterruptedException {
        // Little sanity check
        if((firstEntry > lh.getLast()) || (firstEntry > lastEntry))
            throw BKException.create(Code.ReadException);
       
        Operation r = new ReadOp(lh, firstEntry, lastEntry, cb, ctx);
        engines.get(lh.getId()).sendOp(r);
        //qeMap.get(lh.getId()).put(r);
    }
View Full Code Here

                            aOp.getLedger().getId(), aOp.entry,
                            aOp.ctx);
                        aOp.getLedger().setAddConfirmed(aOp.entry);
                        break;
                    case Operation.READ:
                        ReadOp rOp = (ReadOp) op;
                        LOG.debug("Got one message from the queue: " + rOp.firstEntry);
                        rOp.cb.readComplete(rOp.getErrorCode(),
                            rOp.getLedger().getId(),
                            new LedgerSequence(rOp.seq),
                            rOp.ctx);
                        break;
                    }
                }
View Full Code Here

         * answers.
         */
        LOG.debug("New response: " + rc);
        if(rc == 0){
            SubReadOp sRead = (SubReadOp) ctx;
            ReadOp rOp = (ReadOp) sRead.op;
            PendingReadOp pOp = sRead.pOp;
            if(pOp != null){
                HashSet<Integer> received = pOp.bookieIdRecv;
                //if(!received.containsKey(entryId)){
                //    received.put(entryId, new HashSet<Integer>());
View Full Code Here

                                aOp.entry,
                                aOp.ctx);
                       
                        break;
                    case Operation.READ:
                        ReadOp rOp = (ReadOp) op;
                        rOp.cb.readComplete(rOp.getErrorCode(),
                                rOp.getLedger(),
                                new LedgerSequence(rOp.seq),
                                rOp.ctx);
                        break;
                    }
                }
View Full Code Here

         * Collect responses, and reply when there are sufficient
         * answers.
         */
        if(rc == 0){
            SubReadOp sRead = (SubReadOp) ctx;
            ReadOp rOp = (ReadOp) sRead.op;
            PendingReadOp pOp = sRead.pOp;
            if(pOp != null){
                HashSet<Integer> received = pOp.bookieIdRecv;
               
                boolean result = received.add(sRead.bIndex);
View Full Code Here

    throws BKException, InterruptedException {
        // Little sanity check
        if((firstEntry > getLast()) || (firstEntry > lastEntry))
            throw BKException.create(Code.ReadException);
       
        Operation r = new ReadOp(this, firstEntry, lastEntry, cb, ctx);
        qe.sendOp(r);
        //qeMap.get(lh.getId()).put(r);
    }
View Full Code Here

            throw BKException.create(Code.ReadException);
       
        RetCounter counter = new RetCounter();
        counter.inc();
    
        Operation r = new ReadOp(this, firstEntry, lastEntry, this, counter);
        qe.sendOp(r);
       
        LOG.debug("Going to wait for read entries: " + counter.i);
        counter.block(0);
        LOG.debug("Done with waiting: " + counter.i + ", " + firstEntry);
View Full Code Here

TOP

Related Classes of org.apache.bookkeeper.client.QuorumEngine.Operation.ReadOp

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.