Package org.apache.jute

Examples of org.apache.jute.Record


        if (request.cnxn == null) {
            return;
        }
        zks.decInProcess();
        Code err = Code.OK;
        Record rsp = null;
        try {
            if (request.hdr != null && request.hdr.getType() == OpCode.error) {
                throw KeeperException.create(KeeperException.Code.get((
                        (ErrorTxn) request.txn).getErr()));
            }
View Full Code Here


    static public String packetToString(QuorumPacket p) {
        if (true)
            return null;
        String type = null;
        String mess = null;
        Record txn = null;
        switch (p.getType()) {
        case Leader.ACK:
            type = "ACK";
            break;
        case Leader.COMMIT:
View Full Code Here

                        break;
                    case Leader.PROPOSAL:
                        TxnHeader hdr = new TxnHeader();
                        BinaryInputArchive ia = BinaryInputArchive
                                .getArchive(new ByteArrayInputStream(qp.getData()));
                        Record txn = SerializeUtils.deserializeTxn(ia, hdr);
                        if (hdr.getZxid() != lastQueued + 1) {
                            LOG.warn("Got zxid 0x"
                                    + Long.toHexString(hdr.getZxid())
                                    + " expected 0x"
                                    + Long.toHexString(lastQueued + 1));
View Full Code Here

                        break;
                    case Leader.PROPOSAL:
                        TxnHeader hdr = new TxnHeader();
                        BinaryInputArchive ia = BinaryInputArchive
                                .getArchive(new ByteArrayInputStream(qp.getData()));
                        Record txn = SerializeUtils.deserializeTxn(ia, hdr);
                        if (hdr.getZxid() != lastQueued + 1) {
                            LOG.warn("Got zxid 0x"
                                    + Long.toHexString(hdr.getZxid())
                                    + " expected 0x"
                                    + Long.toHexString(lastQueued + 1));
View Full Code Here

            + crc.getValue());
      }
      InputArchive iab = BinaryInputArchive
          .getArchive(new ByteArrayInputStream(bytes));
      TxnHeader hdr = new TxnHeader();
      Record txn = SerializeUtils.deserializeTxn(iab, hdr);
      if (bw != null)
      {
        bw.write(formatTransaction(hdr, txn));
        bw.newLine();
      } else
View Full Code Here

        ServerCnxn cnxn = request.cnxn;

        String lastOp = "NA";
        zks.decInProcess();
        Code err = Code.OK;
        Record rsp = null;
        boolean closeSession = false;
        try {
            if (request.hdr != null && request.hdr.getType() == OpCode.error) {
                throw KeeperException.create(KeeperException.Code.get((
                        (ErrorTxn) request.txn).getErr()));
View Full Code Here

    static public String packetToString(QuorumPacket p) {
        if (true)
            return null;
        String type = null;
        String mess = null;
        Record txn = null;
       
        switch (p.getType()) {
        case Leader.ACK:
            type = "ACK";
            break;
View Full Code Here

            break;
        case Leader.INFORM:           
            TxnHeader hdr = new TxnHeader();
            BinaryInputArchive ia = BinaryInputArchive
                    .getArchive(new ByteArrayInputStream(qp.getData()));
            Record txn = SerializeUtils.deserializeTxn(ia, hdr);
            Request request = new Request (null, hdr.getClientId(),
                                           hdr.getCxid(),
                                           hdr.getType(), null, null);
            request.txn = txn;
            request.hdr = hdr;
View Full Code Here

    @SuppressWarnings("unchecked")
    protected void pRequest(Request request) {
        // LOG.info("Prep>>> cxid = " + request.cxid + " type = " +
        // request.type + " id = 0x" + Long.toHexString(request.sessionId));
        TxnHeader txnHeader = null;
        Record txn = null;
        try {
            switch (request.type) {
            case OpCode.create:
                txnHeader = new TxnHeader(request.sessionId, request.cxid, zks
                        .getNextZxid(), zks.getTime(), OpCode.create);
View Full Code Here

            break;
        case Leader.PROPOSAL:           
            TxnHeader hdr = new TxnHeader();
            BinaryInputArchive ia = BinaryInputArchive
            .getArchive(new ByteArrayInputStream(qp.getData()));
            Record txn = SerializeUtils.deserializeTxn(ia, hdr);
            if (hdr.getZxid() != lastQueued + 1) {
                LOG.warn("Got zxid 0x"
                        + Long.toHexString(hdr.getZxid())
                        + " expected 0x"
                        + Long.toHexString(lastQueued + 1));
View Full Code Here

TOP

Related Classes of org.apache.jute.Record

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.